tsoHost Help Centre

Table of Contents

How to add a WildCard redirection on the Cloud?

Updated Oct 31st, 2017 at 11:57 GMT

If you want to redirect a domain and everything inside it to a new domain, whilst keeping the permalink structure, then you can do this by using mod_rewrite. Simply add the following lines of code to the site's .htaccess file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.+\.)?old-domain.com$ [NC]
RewriteRule ^ http://new-domain.com%{REQUEST_URI} [R=301,L]

Be sure to change old-domain.com and new-domain.com to your own domains.