rewrite trouble

Topics: Developer Forum
Jan 4, 2008 at 12:39 PM
Hi,

I want to use IIRF to rewrite the following input URL:
www.mydomain.com/site/folder
to
folder.mydomain.com/site

I've checked the readme file and couldn't find a solution.

Thanks in advance!
Jan 4, 2008 at 2:40 PM
You could use a Redirect such as:

RewriteRule ^www.mydomain.com/(\w+)/(\w+) $2.mydomain.com/$1 [I, R]