Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

URL Rewriting and sub folders

 
 
=?Utf-8?B?RGF2aWQgTG96emk=?=
Guest
Posts: n/a
 
      10-26-2007
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!!
--
David Lozzi
Delphi Technology Solutions
Blog: www.lozzi.net
 
Reply With Quote
 
 
 
Reply

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



Advertisments