URL Rewriting and sub folders

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!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,697
Latest member
AugustNabo

Latest Threads

Top