Copied to clipboard

Flag this post as spam?

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


  • skiltz 501 posts 701 karma points
    Mar 14, 2011 @ 02:17
    skiltz
    0

    Url Rewriting not working with ClientDependency

    Not strictly an umbraco question.

    I am using the client dependency framework for js and css files on the frontend of my website (umbraco) but when I use UrlRewriting.Net I am getting a non css copy of the page.

    My rule looks like

     <add name="directory"
                   virtualUrl="^/directory/search/(.*)"
                 rewriteUrlParameter="ExcludeFromClientQueryString"
                      destinationUrl="~/directory/search/?categoryid=$1"
                      ignoreCase="true" />

    If i view the source of the page I can CD working as per normal.

    <link rel="stylesheet" type="text/css" href="DependencyHandler.axd?s=L2Nzcy9jb2xvcmJveC5jc3M7L2Nzcy9ibG9nLmNzczsvY3NzL21haW4uY3NzOy9jc3MvanF1ZXJ5LXVpLmNzczsvY3NzL25pdm8tc2xpZGVyLmNzczsvY3NzL1N0YXJSYXRpbmcuY3NzOw%3d%3d&amp;t=Css&amp;cdv=22" />

    If I use firebug it shows no rules.  If I set debug to true then it works as expected.

    Thanks,

     

     

  • Wesley Herpoelaert 52 posts 123 karma points
    Jul 12, 2011 @ 14:48
    Wesley Herpoelaert
    0

    Hello,

    Have you found a solution for this problem?

    Grtz
    Wesley

  • Brian Bogovich 2 posts 22 karma points
    Jul 12, 2011 @ 16:44
    Brian Bogovich
    0

    The most likely problem is that the URL rewriter is rewriting the request to DependencyHandler.axd.  In his example he would need to change the virtualURL pattern to "^/directory/search/(((?!\.axd\?).)*)$" to exclude .axd requests from the rewrite.

  • wolulcmit 357 posts 693 karma points
    Oct 20, 2011 @ 08:06
    wolulcmit
    1

    for me, catching the DependencyHandler.axd before any other rewrite rules and rewriting it to the root url worked a treat

    <add name="norewrite" virtualUrl="DependencyHandler.axd" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/DependencyHandler.axd" ignoreCase="true" xmlns="" />

     

    - Tim

  • 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