Copied to clipboard

Flag this post as spam?

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


  • Jesse Rivera 8 posts 27 karma points
    Oct 02, 2009 @ 19:14
    Jesse Rivera
    0

    urlrewriting.config not being read?

    Here's what I have in urlrewriting.config:

    <add name="Test" 
    virtualUrl="^~/Test/ProductDisplay.aspx?CatID=1003" 
    destinationUrl="~/products/dslr.aspx" 
    ignoreCase="true"
    redirect="Application"
    redirectMode="Permanent"
    />

    When I enter the url, it is as if the config file isn't ever read.  little help?

  • Wayne 13 posts 33 karma points
    Oct 03, 2009 @ 11:07
    Wayne
    0

    Hi Jesse, I am new to Umbraco too. I don't know whether it is the reason, but have you tried touching web.config to get the config reloaded?

  • Claushingebjerg 939 posts 2574 karma points
    Oct 06, 2009 @ 16:23
    Claushingebjerg
    0

    have you tried including rewriteUrlParameter="IncludeQueryStringForRewrite"  in your rewrite?

    <add name="Test"
    virtualUrl="^~/Test/ProductDisplay.aspx?CatID=1003"
    destinationUrl="~/products/dslr.aspx"
    ignoreCase="true"
    redirect="Application"
    redirectMode="Permanent"
    rewriteUrlParameter="IncludeQueryStringForRewrite"
    />

  • Jesse Rivera 8 posts 27 karma points
    Oct 06, 2009 @ 19:49
    Jesse Rivera
    0

    Thanks!  I tried reloading the web.config which got me to square 1 so thank you!  (rookie mistake...).  Then I tested the following and it works great.

    <add name="Test" 
    virtualUrl="^~/Test/ProductDisplay.aspx" 
    destinationUrl="~/products/dslr.aspx" 
    ignoreCase="true"
    redirect="Application"
    redirectMode="Permanent"
    />

    My dilemma is the "?CatID=1003" after the ProductDisplay.aspx.  I tried the rewriteUrlParameter that Claus suggested but no go.  I think the "?" is being read as an expression rather than being taken literally.  Any way to change this?

    thanks!

    Jesse

     

     

  • Jesse Rivera 8 posts 27 karma points
    Oct 07, 2009 @ 19:25
    Jesse Rivera
    0

    Okay...I have a new expression that goes into an infinite loop...

    <add name="Test"
    virtualUrl="~/Test/test.aspx\?CatID=1003"
    destinationUrl="~/products/dslr.aspx" 
    ignoreCase="true"
    redirect="Application"
    redirectMode="Permanent"
    />

    It now gives the 301 but won't execute the destinationURL.  Maybe a conflict with IIS6?  

Please Sign in or register to post replies

Write your reply to:

Draft