How to redirect the main domain to a sub-domain

To redirect a domain to its own sub-folder,
use the following code in your .htaccess file :

RewriteEngine On
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^present site.com/$ [NC,OR]
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^www.present site.com/$ [NC]
RewriteRule ^(.*)$ http://www.present site.com/sub-folder/$1 [r=301,nc]

Filed Under: Quick fixesTechnical

Tags:

About the Author: InstaCarma is a provider of Enterprise Class Solutions for the Hosting Industry

RSSComments (0)

Trackback URL

Leave a Reply

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
InstaCarma provides outsourced web hosting technical support, helpdesk management, datacenter automation, cloud service management. Sales - 1800 810 6547 - visit www.instacarma.com