• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

.htaccess anti-hotlink problem

-zax-

2[H]4U
2FA
Joined
Jul 21, 2004
Messages
2,192
For some reason I cannot get this code to work, all I get is a HTTP 500 Internal Server error on Apache 2.0.52 with PHP 5.0.3 installed.

Here is the code

Code:
Options +FollowSymlinks
# Anti-Hotlinking

RewriteEngine On 
RewriteCond %{HTTP_REFERER} !^$ 
RewriteCond %{HTTP_REFERER} !^http://(www\.)?somesite\.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://(www\.)?somesite2\.com/ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ - [F]

Anyone know why this particular .htaccess code doesn't work. I've tried many variants and I get the same exact problem until I remove the .htaccess file completely...
 
Update:

I originally tried uploading it with CuteFTP in both Auto, and ASCII modes... neither made a difference.

I just now have tried uploading using the DOS ftp client through ASCII mode and it did not work either.. :(

I am totally stumped at this point. And BTW ... mod_rewrite is installed and enabled in my apache conf file....
 
Check your Apache logs; any time a 500 error is made, a log entry is written to Apache's error log with a reason.
 
My Apache log says this...

...upload/.htaccess: RewriteEngine not allowed here, referer: blah blah blah
 
got it finally....

For some reason I needed

AllowOverride All

set it Apache for the user directory...
 
You might want to lock that down a bit, you just allowed .htaccess rules to do anything they are capable of within your document tree. If you are the only user on that server, might not be an issue. read over httpd.apache.org's doc on the AllowOveride directive, it is fairly fine grained on what you can turn off and on.
 
Back
Top