View Full Version : .htacces and alternate image

02-22-2003, 09: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.

03-05-2003, 10: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



03-07-2003, 02: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.