...

View Full Version : How come .htaccess isn't working right?



fszone
07-30-2004, 06:39 AM
Here is all I have tried:

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org [NC]
RewriteCond %{REQUEST_URI} !^/hotlinking\.gif$
RewriteRule \.(gif|jpe?g|bmp|png|wmv)$ http://www.fszone.org/hi.gif [NC,R,L]

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.*)?fszone\.org/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule \.(gif|jpg|jpeg|bmp)$ http://www.fszone.org/maian_uploader/uploads/fszone.png [L]

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org/forums(/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.fszone.org/maian_uploader/uploads/fszone.png [R,NC]

Then I've uploaded it to http://www.fszone.org/maian_uploader/uploads/ and renamed it to .htaccess. But for some reason it block ALL hotlinks... when it's set to block them from everywhere BUT my own website.

I know for a fact the first one works because a webmaster gave it to me and it works on his server!

Anyone here have any suggestions?

I'm running windows XP with Apache 2.0.49

pb&j
07-30-2004, 06:50 AM
dunno if this helps, but try this one...

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?fszone.org/.*$ [NC]
RewriteRule \.(gif|jpg|bmp|png|wmv)$ http://www.fszone.org/maian_uploader/uploads/fszone.png [R,L]


be sure your file is simply...
.htaccess
and not something like...
.htaccess.txt

fszone
07-30-2004, 07:10 AM
That didn't do the job either. :(

Is there some special server setting or anything I have to allow?

pb&j
07-30-2004, 02:37 PM
have you checked with your host that they allow htaccess and mod_rewrite?

fszone
07-30-2004, 06:01 PM
I'm not sure. Unless you have to change a server setting then I'm guessing yes.


I've also tried the one you gave me on my own server (Easy PHP, Apache 1.3.27) and it didn't work either. Also when I try to access the directory the .htaccess is in I get a 500 Internal Server error :confused:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum