What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » htacces help [solved]

htacces help [solved]
Author: Message:
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
O.P. Huh?  htacces help [solved]
I had a 404 error page for my website that worked, but now i'm trying to add hotlink protection but that fails, and now i get error 500 pages :-S

code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(www\.)?tsdme\.nl/ [NC
RewriteCond %{HTTP_REFERER} !^$
RewriteRule \.(jpe?g|gif|bmp|png)$ images/nohotlink.jpg [L]
ErrorDocument 404 /error404.htm

Does anyone know what i'm doing wrong?

nevermind i already fixed it :-D

code:
ErrorDocument 404 /error404.htm
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?tsdme.nl(/)?.*$     [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.tsdme.nl/images/nohotlink.jpg [R,NC]

It still doesn't work :-S, I don't have those 500 errors anymore, but the hotlink protection doesn't work properly :(

This post was edited on 02-19-2005 at 03:47 PM by Ezra.
[Image: 1-0.png]
             
02-18-2005 09:06 PM
Profile PM Web Find Quote Report
WDZ
Former Admin
*****

Avatar

Posts: 7106
Reputation: 107
– / Male / Flag
Joined: Mar 2002
RE: htacces help
Try adding this right before the RewriteRule line...

RewriteCond %{REQUEST_URI} !images/nohotlink.jpg$ [NC]

It seems that your current code is creating an infinite loop. When someone is redirected to nohotlink.jpg, the hotlink protection is applied again for that image. And again and again and again and again...... :p

The line above should stop the hotlink protection from applying to nohotlink.jpg.
02-19-2005 04:42 AM
Profile PM Web Find Quote Report
Ezra
Veteran Member
*****

Avatar
Forgiveness is between them and God

Posts: 1960
Reputation: 31
37 / Male / Flag
Joined: Mar 2003
O.P. RE: htacces help
It works, thanks you very much :-D
[Image: 1-0.png]
             
02-19-2005 03:46 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On