1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Super Noob redirect question

Discussion in 'General Programming Chat' started by edc, Oct 12, 2008.

  1. edc

    edc Regular Member

    Joined:
    Dec 9, 2007
    Messages:
    279
    Likes Received:
    85
    Location:
    Straight Outta LoCash
    How can I redirect all page requests from one domain / subdomain to the analogous page on another domain / subdomain? For example, I'd like a request to

    www.domain1.com/dir/page1.htm

    to go to

    www.domain2.com/dir/page1.htm

    alternatively, if I could make

    subdomain1.domain1.com/dir/page1

    go to

    subdomain2.domain1.com/dir/page1

    That would work just as well.

    Note that I have complete control over both domains; I'm simply changing domains and don't want to lose any existing traffic. Is there an .htaccess answer here somewhere?
     
  2. lexus7

    lexus7 Newbie

    Joined:
    Oct 11, 2008
    Messages:
    31
    Likes Received:
    4
    im sure you can put a simple redirect script in all the folders, which should have the link you would like to redirect to...

    theres a simple script in php available, type 'domain redirect script' in google! you will find it.. if not look here too.. its around BHW somewhere!
     
  3. bruce6667

    bruce6667 Junior Member Premium Member

    Joined:
    Apr 6, 2008
    Messages:
    136
    Likes Received:
    104
    hey... check this page out.

    Code:
    http://www.webconfs.com/how-to-redirect-a-webpage.php
     
  4. edc

    edc Regular Member

    Joined:
    Dec 9, 2007
    Messages:
    279
    Likes Received:
    85
    Location:
    Straight Outta LoCash
    The problem is, I have several hundred web pages. It doesn't make sense to do one at a time. -e-