Reputation: 1261
I need a help with Regex on URL rewrite module.
I want to apply a rule for the home page.
I tried with ^default.aspx, which is working fine when user access the site with /default.aspx
But normally users are accessing the site with / (www.website.com/) so I am trying to write the reqex and not able to find the correct one.
I tried lot of different combination but nothing worked so far.
^(/default.aspx|$|/$)
^(|/|/default.aspx)
Thanks for the help
Upvotes: 1
Views: 170
Reputation: 11762
You could use the following pattern:
^(/|default.aspx)?$
It will match /
, default.aspx
or nothing
Upvotes: 1