Support » Fixing WordPress » htaccess redirect from old to new domain

  • Resolved paulgian


    Hi all,

    I have a website and had recently rebranded it to

    The new site follows the same exact url structure as the old site. Is there any way to do 301 redirects so that all the old urls are pointing to the new site correctly?

    For example, I want to point => to

    I know how to do it one url at a time but it will drive me nuts as I have 100s of urls to make corrections to. Can anyone help with the correct coding to redirect all the pages at a time?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, this can be achieved by adding this at the top of your .htaccess file of the old site:

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^(.*)$$1 [R=301,L]

    Note: If you are now pointing a new domain name to the same hosted folder, create a new folder at host, add a copy of index.php (in site root folder) from current site, add a .htaccess file with above in it, and then point old domain to that folder. Consult host for help with that.

    Problem solved. Thanks alot Pioneer!


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘htaccess redirect from old to new domain’ is closed to new replies.