Tsohost Knowledge Base

How to add a WildCard redirection on the Cloud?

Modified Friday 13th November, 2015 at 12:26

Was this helpful?

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.

Still can't find what you're looking for?

That's not a problem. Our 24/7 customer support team are friendly and waiting to help answer your questions. The easiest way to get in touch is to raise a support ticket; simply click the button below.

Open Support Ticket