Brian Sandt
asked on
IIS URL Rewrite Rules question
Currently in IIS, I have 3 URL Rewrite rules:
1. Redirect http to https
2. If they forget to put in the www in front of the domain name they are redirected to the correct site
(This is what I used: doesn't match pattern ^www\.([.a-zA-Z0-9]+)$)
3. If they come in using www1 (which still exists), they are redirected to another URL
Now, they want to start using subdomains (example: clientname.domain.com)
What currently happens is rule #2 puts a www in front of the name because it doesn't have www.
We have a lot of clients and they want a subdomain for each one.
Any ideas on how to accomplish this?
1. Redirect http to https
2. If they forget to put in the www in front of the domain name they are redirected to the correct site
(This is what I used: doesn't match pattern ^www\.([.a-zA-Z0-9]+)$)
3. If they come in using www1 (which still exists), they are redirected to another URL
Now, they want to start using subdomains (example: clientname.domain.com)
What currently happens is rule #2 puts a www in front of the name because it doesn't have www.
We have a lot of clients and they want a subdomain for each one.
Any ideas on how to accomplish this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
i.e., start with ^([a-zA-Z0-9]+)\.([a-zA-Z0
then do the remaining rules after