I have a serious problem

Topics: Developer Forum, Project Management Forum, User Forum
Jan 7, 2010 at 4:51 AM

input   *.aaa.com    output  www.aaa.com/a.aspx?id=*

input  *.aaa.com/1.html     output  www.aaa.com/b.aspx?id=1.html

input  *.aaa.com/2.html     output  www.aaa.com/b.aspx?id=2.html

input  *.aaa.com/3.html     output  www.aaa.com/b.aspx?id=3.html

....................................

......................................

*.aaa.com and *.aaa.com/1.html    should be work.

 

help me.

thanks

Coordinator
Jan 7, 2010 at 5:25 AM
Edited Jan 7, 2010 at 5:26 AM

ok, I'm only answering this because I am really cool, and such a terrific, patient person.

how about this:

RewriteCond %{HTTP_HOST} ^([^\.]+)\.aaa\.com$
RewriteRule ^/$   /a.aspx?id=*1      [L]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.aaa\.com$
RewriteRule ^/(\d+)\.html$  /b.aspx?id=$1.html   [L]

After this, either ask your question in complete (English) sentences, or you are on your own.

True enlightenment can be found in the documentation.

Jan 7, 2010 at 5:42 AM

Cheeso, thank you very much, you are good man.