I'm new to this, need help writing this rewrite code. I have 7 domains parked on same server and each domain content is in it's own folder currently I'm using like:
RewriteEngine on
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]
RewriteCond %{HTTP:Host} ^(?:www.)?domain1.com$
RewriteCond %{HTTP:Host} ^(?:www.)?domain2.com$
RewriteRule (.*) /folder1-2/$1 [NC,L,NS]
RewriteCond %{HTTP:Host} ^(?:www.)?domain3.com$
RewriteCond %{HTTP:Host} ^(?:www.)?domain4.com$
RewriteRule (.*) /folder3-4/$1 [NC,L,NS]
...and so on -its working, but if some one type like: domain1.com/folder1-2 -url stays same as is, I like to redirect to folder1-2, but url should only say www.domain1.com (with www prefix and without folder1-2).
can someone please help to write using ISAPI_rewrite.
-thanks
Try it like this for domain 1 and 2: