Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Martin Lingstuyl 202 posts 379 karma points
    Aug 25, 2009 @ 20:56
    Martin Lingstuyl
    0

    urlrewriting - cant get it to work without .aspx

    Hey guys,

    Does someone know the solution to this problem?

    I want to urlrewrite 'users/username' (for example users/martin) to another url.

    But somehow it only works when I add '/default.aspx'. Or something else.

    When I trie it without the aspx, meaning I'm redirecting the entire folder it gives me an http error (says it cant find the right file)

     

    Does someone know how this can be solved?

     

    Thanks in advance.

    Martin

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Aug 25, 2009 @ 21:27
    Peter Dijksterhuis
    1

    Hi,

    if I'm not mistaken, it looks like you don't have the wildcard-entry in your IIS. This means that if you use a URL without the aspx, IIS will treat is as a directory (it is not processed by ASP.NET).

    To make it work, you probably need to add a wildcard-mapping to ASP.NET.

    HTH,

    Peter

  • bob baty-barr 1180 posts 1294 karma points MVP
    Aug 25, 2009 @ 22:14
    bob baty-barr
    1

    damn! Peter beat me! -- i acutally just worked on this early today on one of my sites...

    yes you go map the widcard and update the config to use directory urls...

    then you need to write some rewriting rules to cover your various instances...

    here's how i covered my bases... please someone correct me if i am wrong with anything anyone sees below...

    <add name="KickIt"  virtualUrl="^http\://www.baty-barr.com/(.*).aspx"
                rewriteUrlParameter="IncludeQueryStringForRewrite"
                destinationUrl="http://baty-barr.com/$1"
                redirect="Domain"
                redirectMode="Permanent"
                ignoreCase="true" />

    <add name="KickIt2"  virtualUrl="^http\://www.baty-barr.com/(.*)"
                rewriteUrlParameter="IncludeQueryStringForRewrite"
                destinationUrl="http://baty-barr.com/$1"
                redirect="Domain"
                redirectMode="Permanent"
                ignoreCase="true" />

    <add name="KickIt3"  virtualUrl="^http\://www.baty-barr.com/(.*).aspx"
                rewriteUrlParameter="IncludeQueryStringForRewrite"
                destinationUrl="http://baty-barr.com/$1"
                redirect="Domain"
                redirectMode="Permanent"
                ignoreCase="true" />

  • Martin Lingstuyl 202 posts 379 karma points
    Sep 01, 2009 @ 17:46
    Martin Lingstuyl
    0

    Hi guys,

     

    Thanks for the replies. I tried following your advice by adding a new handler before the staticfile handler.
    (ASP.NET-ISAPI-2.0-Wildcard) that catches all (*).

    It didnt work, and after that I had to change the project to classic App-pool, so I had to delete the reference anyhow. (it made my site go nuts)

    Do you have any ideas what I could do? Please spell it out, I'm kind of new to this stuff.

     

    thanks anyways.

    Martin

  • Ron Brouwer 273 posts 768 karma points
    Sep 01, 2009 @ 18:24
  • David W. 159 posts 284 karma points c-trib
    Sep 09, 2009 @ 11:41
    David W.
    0

    Hi, I'm having some problems with umbracoUseDirectoryUrls and wildcard mapping (I'm using IIS6). When I set it up, the site works great, neat and tidy urls. But the umbraco admin stops working! (rather renders awkwardly) [img]http://img33.imageshack.us/img33/4162/error2ga.jpg[/img] I get the following errors: [img]http://img29.imageshack.us/img29/7503/errorbs.jpg[/img] It seems as if the js-files are not found? Do I need to ad a handler to the js-files in IIS?

    Are the js-files in Umbraco Admin not referenced virtually?

    Help on this would be very appriciated.

  • David W. 159 posts 284 karma points c-trib
    Sep 09, 2009 @ 12:55
    David W.
    0

    I solved my issue. I removed the wildcard mapping for the umbraco_client directory. Works great!

     

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies