Help with a very simple redirect

Discussion in 'Apache' started by eludlow, Dec 8, 2009.

  1. #1
    I have a very simple 301 redirect that is working, but not quite as I'd like it.

    I own several domains that all have the same content. Let's call them abc.co.uk, abc.com, abc.net and abc.org.

    I used to have a file called see_more_1.php that I've no renamed to see_more.php

    At present my .htaccess line looks like:

    Redirect 301 /see_more_1.php http://www.abc.com/see_more.php
    
    Code (markup):
    which works fine, but what I really want is to direct to the appropriate domain, rather than always going to .com

    So, if someone tried to view http://www.abc.co.uk/see_more_1.php I want the redirect to go to http://www.abc.co.uk/see_more.php

    I'm sure this can be done - any help on how would be much appreciated!

    Thanks,
    Ed Ludlow
     
    eludlow, Dec 8, 2009 IP
  2. clinton

    clinton Well-Known Member

    Messages:
    2,166
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    110
    #2
    What's it doing right now? Is it just not working?
     
    clinton, Dec 8, 2009 IP
  3. eludlow

    eludlow Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    At the moment if it always re-directs to abc.com - however I want to re-direct to .co.uk, .com etc as appropriate from the referrer.

    Does that make sense?
     
    eludlow, Dec 8, 2009 IP