Redirecting a domain to a subfolder using .htaccess.

Edit .htaccess file and include the following

 RewriteEngine On

 Options +FollowSymlinks

 RewriteBase /

 RewriteCond %{HTTP_HOST} www.domainname [OR]

 RewriteCond %{HTTP_HOST} domainname

 RewriteCond %{REQUEST_URI} !subfolder/

 RewriteRule ^(.*)$ subfolder/$1 [L] 

Leave a Comment