I have a folder named \"folder1\" in my root directory
www.domain.com/ www.domain.com/folder1
I need to redirect all the requests to www.dom
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/folder1/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) folder1/$1 [L,R]
L
flag means this is the last rule applied (even if there are rules after it), R
means redirect. You can also add QSA
flag if you want any query-string parameters passed to the original be sent to the new url