![]() |
.htaccess help
well guys i have something like this
RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*sexkey.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://([a-z0-9-]+\.)*myurl.com [NC] RewriteRule /* http://badrequest [R,L] well i had that to protect my members area of my avs.. well right now all my avs folders are similar.. gallery1.html gallery2.htm main.html well main.html has the link to the galleries.. well i dont want to keep making a new .htaccess for every folder so how do i make it protect only gallery, gallery2, and main.html files, in a folder containing other sites i dont want to protect |
You Don't...
But your problem is easy, Put all the files in one folder that you want to protect, and the ones that are free access in another folder, then just put the .htaccess in the protected folder, it will protect it and all sub folders but not affect the other folders outside of it. ie protected /home/user/html/web/protected/ (put .htaccess here) Not protected /home/user/html/web/free_files/ This is what I use for code and it works very well: RewriteEngine On RewriteCond %{HTTP_REFERER} ^$ [OR] RewriteCond %{HTTP_REFERER} !^http://www.gofuckyourself.com/ [NC] RewriteCond %{HTTP_REFERER} !^http://gofuckyourself.com/ [NC] RewriteRule /* http://www.gofuckyourself.com/fuckoff.html [R,L] Hope this helps. Regards Burnie :rasta |
RewriteCond %{REQUEST_URI} /(main|gallery1|gallery2).html$ [NC]
:2 cents: |
All times are GMT -7. The time now is 04:53 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123