Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



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

Posts: 30
Location: London, UK
Trades: 0
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?

Last edited by Loon; 06-20-2003 at 05:07 AM..
Loon is offline
Reply With Quote
View Public Profile Visit Loon's homepage!
 
 
Register now for full access!
Reply     « Reply to Help with .htaccess & mod_rewrite
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB 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.08484 seconds with 12 queries