We’ll learn to redirect domains to a different area utilizing the .htaccess file.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^instance.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.instance.com [NC]
RewriteRule ^(.*)$ http://instance.web/$1 [L,R=301,NC]


This code will redirect the outdated area to a brand new area. instance.com is the outdated area and instance.web is the brand new area.

If you wish to redirect to https model, then use beneath code

RewriteEngine on
RewriteCond %{HTTP_HOST} ^instance.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.instance.com [NC]
RewriteRule ^(.*)$ https://instance.web/$1 [L,R=301,NC]

Previous articleHow to set up VestaCP with PHP7.2 and MariaDB10.3
Next articleHow to setup ERPNext Production on Ubuntu 16.04

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

LEAVE A REPLY
Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Deprecated: Function get_magic_quotes_gpc() is deprecated in /home/freetech/public_html/wp-includes/formatting.php on line 4764

Please enter your comment!
Please enter your name here