I have a url rewriter on my website and need help making a tight RegExp so I can reroute requests based on the domain name. My website has a root folder called "/userfiles" which is where all the sub websites go under. So the structure is like this:
/userfiles/site1
/userfiles/site2
/userfiles/site3
Say I have a domain called domain1.com that is supposed to go to /userfiles/site1/*.* and no where else. So what I want the result to be is like this:
=> => => => => => => => => => =>
Can anyone see the pattern in here to make a solid RegExp? Below is an entry I put in my rewriter app, but that just sends anything that hits the root will rewrite it the new format carrying all its parameters:
<rewrite url="^(.*)/(\?.+)?$" to="$1/userfiles/site1$2" />
Can anybody help construct or start a single rule that can handle all my examples above specifically for domain1.com?
/userfiles/site1
/userfiles/site2
/userfiles/site3
Say I have a domain called domain1.com that is supposed to go to /userfiles/site1/*.* and no where else. So what I want the result to be is like this:
=> => => => => => => => => => =>
Can anyone see the pattern in here to make a solid RegExp? Below is an entry I put in my rewriter app, but that just sends anything that hits the root will rewrite it the new format carrying all its parameters:
<rewrite url="^(.*)/(\?.+)?$" to="$1/userfiles/site1$2" />
Can anybody help construct or start a single rule that can handle all my examples above specifically for domain1.com?