Help subdomain - basic rewriting

Topics: Developer Forum
Feb 20, 2008 at 1:15 PM
Please I need some help with this rewrite. I'm using Ionic v1.2.7 and I what I want to do is this:

xxx.mydomain.com/y/z.asp

rewrite to

www.mydomain.com/aaa/y/z.asp?id=xxx

Thanks in advance!

Fede
Coordinator
Feb 24, 2008 at 2:57 PM
Edited Feb 24, 2008 at 2:58 PM
did you try the readme?
did you try the testdriver.exe?

what rule are you using?
what input did you try?
what results do you expect?
what results are you getting?

also, I suggest upgrading to the latest version if that is possible.

Thanks,
-cheese
Mar 13, 2008 at 5:46 PM
ok i´ve upgraded to v1.2.13

what i'm trying is to redirect

username.mysite.com
to
www.mysite.com/folder/default.asp?id=username

and also

username.mysite.com/page.asp
to
www.mysite.com/folder/page.asp?id=username

and also

username.mysite.com/xxx/page.asp?a=z

to

www.mysite.com/folder/xxx/page.asp?id=username&a=z


I've tried with this:
RewriteCond %{HTTP_HOST} ^(?!www)(\w+)\mysite\.com$
RewriteRule ^(.)\.asp\?(.)$ /folder$1.asp?id=%1&%{QUERY_STRING} L

but it doesn't work..is it possible to do it all in one rule?

Thanks in advance!
Fede