Reply
Help with .htaccess & mod_rewrite
Old 06-20-2003, 04:52 AM Help with .htaccess & mod_rewrite
Experienced Talker

Posts: 30
Location: London, UK
Hi

I used to use the following in my .htaccess file to prevent people hotlinking to my downloads

Code:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://mydomain.com/.*$ [NC]
RewriteRule .*\.(exe|ocx|dll|zip|rar)$ - [F]
This always used to work fine for me, however a while ago my host moved to a different server, and now if i use the same in my .htaccess file when i (or anyone) tries to access my site you just get directed to the 403 page

At first i thought mabye mod_rewrite wasn't setup on the new server but it's listed under the loaded modules in phpinfo so i guess it must be.

Any ideas?

Thanks

*edit - Arrgh i just checked my error logs and found the following

Quote:
[Fri Jun 20 04:23:33 2003] [error] [client ***.***.**.***] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /home/virtual/site31/fst/var/www/html/error_docs/403.html
I guess this means it's disabled on the server even though mod_rewrite is on :\

I don't think there's another way to prevent hotlinking with .htaccess is there?
__________________
http://netcode.net

Last edited by Loon : 06-20-2003 at 05:07 AM.
Loon is offline
Reply With Quote
View Public Profile Visit Loon's homepage!
 
When You Register, These Ads Go Away!
Reply     « Reply to Help with .htaccess & mod_rewrite
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11538 seconds with 12 queries