![]() |
htaccess nightmare
Hi guys
Hope you can help with this one :D 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 |
hotlinking FAQ
First, the RewriteRules you have will do what you want. They aren't the best way, they miss a number of potential cases, but, in general should protect you pretty well. I would suggest that you use what is in the FAQ over those. to add another domain to the list, just copy the line that says yourdomain\.com and replace yourdomain\.com with anotherdomain\.com However, the deny from all allow from mysite1.com mysite2.com This will cause quite a bit of havoc. First, every request that comes into your site will require a DNS lookup. Secondly only the people surfing from the servers mysite1.com and mysite2.com will be able to see the content. Note: from the server, not some surfer sitting at home using bellsouth, only your web servers will be able to surf your sites (and depending on how your server is configured, if they are on virtual IP addresses, they would probably not even be coming from that IP. Definitely not what you want. |
Oh my |banghead| |banghead| |banghead|
Thanks sparky I would rather be fuskered than not have customers be able to see what they bought :D That will cover me for the content outside the members area but i missed the bleeding obvious AGAIN... I use ccbill so now its over to them. Thanks again |
All times are GMT -4. The time now is 10:05 AM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc