WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] .htacess rewrite going from subdomain to a primary (2 posts)

  1. gnarlyinc
    Member
    Posted 1 year ago #

    Hi I've searched but can't figure out how to do.

    I've changed one of the site domains from sitename.mysite.com to sitename.com what rewrite/redirect rules should I put in the .htaccess file to keep the old links working?

    Thanks!

  2. gnarlyinc
    Member
    Posted 1 year ago #

    I got it to work.
    using
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} sitename.mysite.com$ [NC]
    RewriteRule ^(.*)$ http://sitename.com/$1 [L,R=301]

    A tutorial about Migrating Domains helped.

Topic Closed

This topic has been closed to new replies.

About this Topic