Previously, on StackOverflow ...
(Summarized)
I need to capture all requests, for a particluar subdomain .. and rewrite their destination.
Now, the trick to determining the host via regex was solved.
Now, i need to make sure all requests to the root index page is rewritten, but i can't figure out the correct regex to find the 'homepage' / website root.
this is what i have....
<if header="HTTP_HOST" match="^foo\.mydomain\.com\.au(?::\d+)?/?$">
<!-- snip some other rewrites, eg./buying/product -> ~/Pages/Foo/Bar.aspx -->
<rewrite url="^/$" to="~/Pages/SomeWeirdFolder/Home.aspx" processing="stop"/>
</if>
Now if one of the rewrites were not found, then it falls through and continues.
So .. can anyone please help?
UPDATE
I've also tried "^$"
, "^~/$"
, "^~?/?$"
... with no luck.