Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .htacces and alternate image

    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.
    MLReynolds

  • #2
    New Coder
    Join Date
    Jan 2003
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #3
    New to the CF scene
    Join Date
    Feb 2003
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Reply

    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
    Last edited by MLReynolds; 03-07-2003 at 01:42 AM.
    MLReynolds


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •