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?

Not a problem - our 24/7 customer support team are super friendly and here to help answer all your questions. There's no need to wait, click below to start a Live Chat.

Start Live Chat

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

Not a problem - our 24/7 customer support team are super friendly and here to help answer all your questions. Don't delay, click below to find out how you can get in touch.

Get in Touch