.htaccess redirect all domain's pages to single page on another domain?

Discussion in 'Apache' started by emptymirror, Jan 21, 2008.

  1. #1
    I've really gotten myself confused over this one.

    I want to redirect every page on a particular domain to only the homepage of another domain.

    When the redirect is done, I want the address that shows in the address bar to be the one for the new domain, not the old one.

    I have tried several things, but nothing really works.

    Can anyone make a suggestion?

    Thanks!
    Denise
     
    emptymirror, Jan 21, 2008 IP
  2. emptymirror

    emptymirror Well-Known Member

    Messages:
    367
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Well, after some more Googling, here's what I finally found that works:

    RedirectMatch permanent /.* http://www.newdomain.com/

    Thanks anyway, guys!

    cheers ~
    Denise
     
    emptymirror, Jan 21, 2008 IP
  3. muddy

    muddy Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes that's the one, I have been sifting the Internet trying to find a solution. Thought I'd have to do individual 301 redirects for all gazillion pages that don't exist on the new website. THANK GOD!

    And thank you Denise.

    muddy :D
     
    muddy, Jun 11, 2008 IP