Redirecting a domain to a subfolder using .htaccess.

Edit .htaccess file and include the following entries:

RewriteEngine On

Options +FollowSymlinks

RewriteBase /

RewriteCond %{HTTP_HOST} www.domainname [OR]

RewriteCond %{HTTP_HOST} domainname

RewriteCond %{REQUEST_URI} !subfolder/

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

Related posts:

  1. How to redirect non ssl (http links) traffic to SSL (https links)
  2. Error in Drupal while enabling clean URL
  3. Password protect Parent and Allow subdirectory using .htaccess

Comment Form

About this blog

This blog, acts as a knowledge repository for the world and is unofficial! Anything we find interesting in the cyber world will go here. Most cases, this blog will reflect the happiness of our staff in reaching successful solution to an issue (s)he worked on. A reference for other fellow SAGEs who come across similar issues later