If you want to redirect your domain name to sub-directory but the url shows only domain name

For example :

http://yourdomain.com redirect to http://yourdomain.com/blog but the URL shows only http://yourdomain.com

Then add the following rules in your .htaccess file.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yourdomain.com
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
RewriteRule    ^$   blog/    [L]
RewriteRule    (.*)  blog/$1 [L]

It is easy but to perform this task you need to consider one of the inslyHost web hosting plans and then edit or upload a .htaccess file from your file manager or SSH access on your cPanel hosting plan or a Linux Dedicated Server or the linux VPS hosting plan.