Redirect Your Domain To A Subfolder Using .htaccess


/ Published in: Apache
Save to your folder(s)

Redirect to a subfolder (blog) in a search engine friendly way using .htaccess. Change “YourDomain.com” to your domain name.


Copy this code and paste it in your HTML
  1. RewriteEngine On
  2. RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
  3. RewriteRule ^(/)?$ blog [L]

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.