Redirect all pages

Discussion in 'Apache' started by login, Dec 3, 2008.

  1. #1
    If I use this::

    redirectMatch 301 ^(.*)$ http://www.domain.com
    Code (markup):
    Will all the pages on the old domain redirect to the identical pages on the other domain?

    Example: Will the domene.com/blabla.html be redirected to domene2.com/blabla.html ?
     
    login, Dec 3, 2008 IP
  2. xd2

    xd2 Peon

    Messages:
    694
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I think you would need /$1 on the end like:
    redirectMatch 301 ^(.*)$ http://www.domain.com/$1
    Code (markup):
     
    xd2, Dec 4, 2008 IP