htaccess rules not working need help

Discussion in 'Apache' started by Z33M@N, Sep 10, 2009.

  1. #1
    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?sa-tourism\. [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(.+)\.google\. [NC]
    RewriteRule ^(.*)\.(gif|jpe?g|png)$ http://%{HTTP_HOST}/images/hotlink.jpg [R,NC,L]
    Code (markup):
    I want to redirect this www.domain.com/sa-tourism/wp-content/uploads/2009/03/vuvuzela.jpg to the hotlink image?

    What am I doing wrong, my images not redirecting to the hotlink image :confused:

    Thanks
     
    Z33M@N, Sep 10, 2009 IP
  2. szalinski

    szalinski Peon

    Messages:
    341
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try replacing %{HTTP_HOST} in your final Rewrite line above with your actual domain/host?
     
    szalinski, Sep 15, 2009 IP
  3. Lookey

    Lookey Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes try replacing the details with ur details
     
    Lookey, Sep 16, 2009 IP