Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > URL Rewriting and sub folders

Thread Tools

URL Rewriting and sub folders

Posts: n/a
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 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 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="^~/(.*)/(.*)\.(.*)"
destinationUrl="~/default.aspx?pageID=$2&nav=$1" ignoreCase="true" />
<add name="defaultPage" virtualUrl="^~/(.*)\.(.*)"
destinationUrl="~/default.aspx?pageID=$1" ignoreCase="true" />
<add name="admin" virtualurl="^~/admin/"
destinationUrl="~/admin/default.aspx" ignoreCase="true" />
<add name="subs" virtualurl="^~/(.*)"
destinationUrl="~/default.aspx?pageID=$1" ignoreCase="true" />

David Lozzi
Delphi Technology Solutions
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Death To Sub-Sub-Sub-Directories! Lawrence D'Oliveiro Java 92 05-20-2011 06:50 AM
zipping files folders and sub folders w/ winzip or winrar Mike Computer Support 5 03-28-2008 09:10 PM
Recognising Sub-Items and sub-sub items using xslt Ben XML 2 09-19-2007 09:35 AM
url rewriting with no extension in url =?Utf-8?B?cmFwaWRkYXRh?= ASP .Net 8 11-02-2006 01:48 PM
url rewriting when the url contains parameters Gaurav Agarwal Java 2 01-31-2005 11:15 AM