Keep All Sub URL Same Even Domain Name Change

Many times we have an in CMS and eCommerce website to change the domain due to maintenance or other reason but the main headache is the sub URL (categories or collection) should be work as it is otherwise we need to write the 301 URL redirect for each and every URL to not get the SEO errors. Let’s take a look at here, Without Domain Name change how to keep all Sub URL same as.

This is tutorial will be helpful for the following CMS:

  1. WordPress development
  2. Joomla development
  3. Drupal development

An eCommerce platform that gets help from this:

  1. Magento eCommerce Store development
  2. BigCommerce Online Store development
  3. Volusion Store Development
  4. VirtueMart

So here is the simple and easy option for keeping all URL same while changing the domain name that will work using the add the few lines in the htaccess file (if file not available create it .htaccess).

Append the following code in the file.

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(?:www.)$ [NC]
RewriteRule ^{REQUEST_URI} [L,R=301]
Keep All Sub URL Same Even Domain Name Change

Chetan Patel

Director at Metizsoft Solutions, Chetan Sheladiya today stands at the top of a leading Mobile Application Development company, which further specializes in Online Business Marketing, Social Media Marketing, Web Development, amongst other areas. A tech-lover at heart, Chetan has had more than a decade worth of experience, dealing with hundreds of projects, and creating a bunch of unique IT solutions along the way. His other interest lies in sharing his ideas and opinions with people as passionate about technology, as he is. You can find his thoughts expressed on LinkedIn, Twitter, and Facebook.

Facebook Twitter Linkedin