.htaccess 301 redirect question

Discussion in 'Site & Server Administration' started by CasinoSEO, Nov 21, 2009.

  1. #1
    Hello, please give me a tip how to redirect all URL's to the same location on new domain.

    For example, I have 500 HTML pages

    xhttp://www.olddomain.com/example_01.html
    xhttp://www.olddomain.com/example_03.html

    I want to move them like this:

    xhttp://www.newdomain.com/example_01.html
    xhttp://www.newdomain.com/example_03.html

    To keep a PR and SERPs of every page.

    Thanks in advance.
     
    CasinoSEO, Nov 21, 2009 IP
  2. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #2
    If two domain names point to the same site, try this .htaccess
    
    RewriteEngine on
    RewriteCond %{HTTP_HOST} !^www\.newdomain\.com$
    RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
    
    Code (markup):
    Hope this helps :)
     
    thuankkk, Nov 21, 2009 IP