I have mp3's in a directory called /mp3/
and I want to be able to access them only from another page.php
in another directory /main/
on the site.
No direct linking from outside.
All of the pages are written in php
I put this code in the .htaccess
file inside the /mp3/
directory...
Order deny,allow
deny from all
allow from 127.0.0.1
allow from localhost
allow from mydomain.com
allow from 123.45.678.90 # that's myserver's IP address (real one used in code)
Satisfy Any
But none of those work. It does work however if I use the IP address of were I am.
allow from 1.2.3.4 # my internet connection (real one used in code)
But that means it would work for anyone and their IP address.
What am I missing here? Does this work only on certain servers? How do I make it use the server's IP address and not my IP address?