WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] htaccess redirect from old to new domain (3 posts)

  1. paulgian
    Member
    Posted 2 months ago #

    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!

  2. Pioneer Valley Web Design
    Member
    Posted 2 months ago #

    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.

  3. paulgian
    Member
    Posted 2 months ago #

    Problem solved. Thanks alot Pioneer!

    Paul

Reply

You must log in to post.

About this Topic