...

View Full Version : .htacces and alternate image



MLReynolds
02-22-2003, 08:32 PM
I included the following line in my .htaccess file;

RewriteRule \.(gif|jpg)$ http://www.michaelsplace.us/noimage.jpg [R,L]

but the alternate image does not display. Although I stopped the hot links, I'm wondering why the "noimage.jpg" is not displayed. Is there something I'm overlooking?

Any thoughts would be appreciated.

g00fy
03-05-2003, 09:54 AM
do you have a RewriteCond %{HTTP_REFERER} <URL of page accessing your domain> ?

my understanding is that the RewriteCond directive states that if the {HTTP_REFERER} matches the URL that follows, then use the RewriteRule directive.
The RewriteRule directive will redirect any reference back to the referring web page.


does this help or do you already have a RewriteCond ?

this works fine for me


HTH


g00fy

MLReynolds
03-07-2003, 01:37 AM
Thank you for your response. Yes, I have that condition. The entire script reads;

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://michaelsplace.us.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://www.michaelsplace.us.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp)$ http://www.michaelsplace.us/noimage.jpg [R,NC]

But still, no image is displayed.

Michael



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum