Filed Under: ModRewrite

Redirect root to folder

12 May 2008 No Comment Tags: , , ,

If you want to redirect your root site to a subfolder then the following code can help you:
RedirectMatch ^/$ http://name.com/forums/
Add that to your .htaccess file after “RewriteEngine On”.
The ^ is a regular expression and stands for the the start string, the $ stands for the end string.
If you are new to RegEx I recommend the Regular Expression Cheat Sheet!







Like our posts? Then subscribe via Mail:

Email:  

Similar Posts:

Socialize:

delicious stumbleupon

Leave your response!

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.com.