How to redirect a Domain to sub-directories ?

If you want to redirect a  domain to subdirectories  then just add the below code in the .htaccess :

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^(.*)$$1 [R=301,L]
RewriteRule    ^$   subdirectory/    [L]
RewriteRule    (.*)  subdirectory/$1 [L]

This will redirect the  to  but when you access the domain in the browser then it will just show in the browser not  .

That’s all  you are done.

Note  :  Replace the  to  your  domainname .