WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] htaccess redirect from old to new domain

[Resolved] htaccess redirect from old to new domain

  • Hi all,

    I have a website onlinediamondbuyingguide.com and had recently rebranded it to beyond4cs.com.

    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 =>
    http://onlinediamondbuyingguide.com/step-by-step-guide/ to http://beyond4cs.com/step-by-step-guide/

    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 ^(.*)$ http://beyond4cs.com/$1 [R=301,L]
    </IfModule>

    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!

    Paul

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