PDA

View Full Version : htaccess protecting a directory help please


hermit
2004-05-10, 10:54 AM
hi. i need a htaccess file that will make it so that in order to access any html pages in http://www.mydomain.com/free-galleries/imagepages/ they have to come from a page on my site. i dont want a serfer to be able to browse them by typing in image002.html, image003.html etc... i have a php script thats randomly choosing 10 per day out of in some cases 350 and i dont want a smart serfer to be able to see them all. make sense? thanks. rl

Cleo
2004-05-10, 01:05 PM
Here you go, just replace my domain info with your domain info.



AuthType Basic
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://www.cleos-porn-links.com/adult-links/*$ [NC]
RewriteRule /* http://www.cleos-porn-links.com/ [R,L]

hermit
2004-05-10, 01:14 PM
excellent, thank you very much cleo.

hermit
2004-05-13, 10:56 AM
just finished my first gallery with pics on html pages and the htaccess works perfectly. thanks again :)