Re-direct Traffic from video.google to another page on my site

Discussion in 'Apache' started by GADOOD, Feb 5, 2007.

  1. #1
    Hi there,

    I would like re-direct all of the traffic I'm currently receiving from Google Video to another page on my site (www.domain.com/gvideo.html) instead of where it's going at the moment which is www.domain.com

    I guess this would be the same re-directing the traffic that comes from Google Images - but I have no idea how to do it. :(

    My current .htaccess file looks like this because I also run Wordpress on this domain:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    What would I need to add?

    Any help would be much appreciated!

    Thanks,

    Pete
     
    GADOOD, Feb 5, 2007 IP
  2. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteBase /
    RewriteCond %{HTTP_REFERER} ^http://video\.google\.
    RewriteRule ^$ gvideo.html [R,L]
    Code (markup):
    Something like that? Match the referrer with video.google. (can't be more specific because google uses different TLDs) and redirect to gvideo.html
     
    rodney88, Feb 5, 2007 IP
  3. GADOOD

    GADOOD Peon

    Messages:
    1,745
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Rodney I will give it a try: Will that fit in to my current .htaccess ok, or do I need to put it in a specific way?

    I'm not good at this at all - how do I include the .com TLD?

    Cheers,

    Pete
     
    GADOOD, Feb 5, 2007 IP
  4. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It can go anywhere that doesn't interupt the existing rules so:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    
    RewriteBase /
    RewriteCond %{HTTP_REFERER} ^http://video\.google\.
    RewriteRule ^$ gvideo.html [R,L]
    </IfModule>
    Code (markup):
     
    rodney88, Feb 5, 2007 IP
    Ritu likes this.
  5. GADOOD

    GADOOD Peon

    Messages:
    1,745
    Likes Received:
    241
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Brilliant mate - it's working a treat! :)

    Thanks so much!

    Pete
     
    GADOOD, Feb 5, 2007 IP