Thread: .htaccess help
View Single Post
Old 11-19-2002, 09:56 PM  
Burnie
Confirmed User
 
Join Date: Nov 2002
Location: Hurricane Florida
Posts: 205
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
Burnie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote