I want to redirect all trafic from the root of my webby to a subfolder on the same domain useing .htaccess

Can someone help me out here?

link|improve this question
feedback

2 Answers

Place this in your webroot .htaccesss

RewriteEngine on 
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteCond %{REQUEST_URI} !^/subfolder/ 
RewriteRule ^(.*)$ /subfolder/$1 [L]

It checks incoming requests, any to that domain get redirected, unless they are already redirected.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown