G
Guest
Hello there,
I have my .net 2.0 website setup for url rewriting. For the most part it
works great. I have it setup so that any subfolder like
http://www.delphi-ts.com/dhq will redirect to dhq.html. This rule is last in
the list of rewrite rules. We have subfolders however we need to get access
to like http://www.delphi-ts.com/admin. I've setup a rule in web.config to
handle ~/admin/ and if i enter in .com/admin/ i can get to the folder. I've
setup a rule like ~/admin and it doesn't work. I've also tried ~/admin(.*)
hoping to grab it and that doesnt work. It just sends it to default.aspx. All
of my rules are below. Any ideas?
<add name="PagewithNav" virtualUrl="^~/(.*)/(.*)\.(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/default.aspx?pageID=$2&nav=$1" ignoreCase="true" />
<add name="defaultPage" virtualUrl="^~/(.*)\.(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/default.aspx?pageID=$1" ignoreCase="true" />
<add name="admin" virtualurl="^~/admin/"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/admin/default.aspx" ignoreCase="true" />
<add name="subs" virtualurl="^~/(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/default.aspx?pageID=$1" ignoreCase="true" />
THANKS!!
I have my .net 2.0 website setup for url rewriting. For the most part it
works great. I have it setup so that any subfolder like
http://www.delphi-ts.com/dhq will redirect to dhq.html. This rule is last in
the list of rewrite rules. We have subfolders however we need to get access
to like http://www.delphi-ts.com/admin. I've setup a rule in web.config to
handle ~/admin/ and if i enter in .com/admin/ i can get to the folder. I've
setup a rule like ~/admin and it doesn't work. I've also tried ~/admin(.*)
hoping to grab it and that doesnt work. It just sends it to default.aspx. All
of my rules are below. Any ideas?
<add name="PagewithNav" virtualUrl="^~/(.*)/(.*)\.(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/default.aspx?pageID=$2&nav=$1" ignoreCase="true" />
<add name="defaultPage" virtualUrl="^~/(.*)\.(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/default.aspx?pageID=$1" ignoreCase="true" />
<add name="admin" virtualurl="^~/admin/"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/admin/default.aspx" ignoreCase="true" />
<add name="subs" virtualurl="^~/(.*)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/default.aspx?pageID=$1" ignoreCase="true" />
THANKS!!