The WildCard Redirection on Cloud Server

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:

1

2

3

RewriteEngineOn

RewriteCond%{HTTP_HOST}^(.+\.)?old-domain.com$[NC]

RewriteRule^http://nrhosting.com%{REQUEST_URI} [R=301,L]

Be sure to change old-domain.com to your previous domain name and nrhosting.com to your new domain.

Add comment

You may also like

To facilitate SSL functionality across multiple web servers in a clustered environment we deploy a separate SSL load balancer. This means that sites can have SSL enabled with no downtime due to the IP change. If you are developing an application to...

To speed up the loading of your static content on your site (such as images, JavaScript, CSS files, etc) it is possible to tell your site to load them from the cloud’s high-speed Nginx cluster. To do so, simply contact with our support team...

Websites get “hacked” all the time, and the symptoms a site experiences as a result differs from case to case. Your website might redirect to a website you’ve never seen before, it might get flagged as malicious by Google, or it might have even...

NR Hosting was founded in 2013 with the goal to provide the best hosting experience to users. We use both custom and open source solution, Day by day we are becoming the leading PaaS Cloud base solution.