How can i redirect Root to a Folder on my hosting?

February 7th, 2010

Using .htaccess you can very simply redirect your root to a folder on your website. For e.g. when someone would type example.com they would be automatically be redirected to example.com/folder/index.html

To do the above, please add the following line in your .htaccess

RedirectMatch permanent ^/$ http://example.com/folder/index.html

Please replace example.com and folder with your hosting details.

Comments

  1. Making your PHP code work within files with extension .html August 1st, 2010

    […] Related Articles: 1. Redirecting your non www domain.com to http://www.domain.com using .htaccess […]

Leave A Comment