I need to do the following .. have come across various examples but i need to combine three conditions
redirect 1) redirect non www / non subdomain requests. eg :
http://xyzsite.com to http://www.xyzsite.com
2) redirect if subdomain is mentioned . eg :
http://user1.xyzsite.com to http://www.xyzsite.com/profile?user1
3) redirect to mobile version. eg :
http://m.xyzsite.com to http://www.xyzsite.com/m
Tech details : I m on IIS ver 6 & using helicontech isapi_rewrite module
1.
^xyzsite.com$
www.xyzsite.com
2.
^(?!www.)(.*).xyzsite.com$
www.xyzsite.com/profile?$1
3.
^m.(.*)$
www.$1/m