URL Rewriting and sub folders

Discussion in 'ASP .Net' started by =?Utf-8?B?RGF2aWQgTG96emk=?=, Oct 26, 2007.

  1. 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
    =?Utf-8?B?RGF2aWQgTG96emk=?=, Oct 26, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?RGVhc3Vu?=
    Replies:
    1
    Views:
    341
    Karl Seguin
    Jul 12, 2005
  2. Gaurav  Agarwal
    Replies:
    2
    Views:
    709
    Gaurav Agarwal
    Jan 31, 2005
  3. =?Utf-8?B?cmFwaWRkYXRh?=

    url rewriting with no extension in url

    =?Utf-8?B?cmFwaWRkYXRh?=, Nov 1, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    391
    Flinky Wisty Pomm
    Nov 2, 2006
  4. Ben
    Replies:
    2
    Views:
    857
  5. Lawrence D'Oliveiro

    Death To Sub-Sub-Sub-Directories!

    Lawrence D'Oliveiro, May 5, 2011, in forum: Java
    Replies:
    92
    Views:
    1,955
    Lawrence D'Oliveiro
    May 20, 2011
Loading...

Share This Page