View Single Post
Old 2006-10-17, 09:35 AM   #1
sspproductions
Rock stars ... is there anything they don't know?
 
Join Date: Jun 2006
Posts: 19
Send a message via ICQ to sspproductions
Question htaccess nightmare

Hi guys

Hope you can help with this one

I have got to create a htaccess file that blocks sites like fusker and hotlinking but allows me to get the content for my two sites from the one subdomain where the content is stored.

I think this would work but not sure


RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://subdomain.mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://subdomain.mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://subdomain.mysite.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://subdomain.mysite.com/.*$ [NC]
RewriteRule .*\.([gG][iI][fF]|[jJ][pP][gG])$ - [F]

order allow,deny
deny from all
allow from mysite1.com mysite2.com


oh yeah does this solve the problem where people can look in the directory if they type it in?
thanks
sspproductions is offline   Reply With Quote