UrlRewriter Error -- Cannot use a leading .. to exit above the top directory

Discussion in 'ASP.NET 2.0' started by Barlow, Nov 29, 2007.

  1. I'm using UrlRewriter to rewrite some blog urls. I think this may have to do with the Css file. My structure looks like this:

    App_Themes/Default/images
    App_Themes/Default/DefaultStyle.css

    In my .master, I linked the css like: href="~/App_Themes/Default/DefaultStyle.css"

    All references in the Css file to images look like this: url(images/blah.jpg)

    My rewrite statement is like this:

    <rewrite url="/users/([a-zo-9]+)/blog/(\d{4})/(\d{1,2})/(\d{1,2}) to "~/Blogs/ViewBlog.aspx?username=$1&amp;amp;yr=$2&amp;amp;mon=$3&amp;amp;day=$4" processing="stop" />

    I get the error when navigating to for example: /testuser/blog/2007/11/28.

    I also have some rewrite statements that just goto the year so using /testuser/blog/2007. That works. Also the month works. It seems when it gets 3 levels deep it has a problem. I've read on the internet and i've also added this to my config file: cookieless="UseCookies" in the authentication/forms section. Does anyone have any solutions?
     

Share This Page