locked
Intelligencia URL Rewriter - problem with multiple query strings RRS feed

  • Question

  • User894003439 posted

    Hi!

    I am using Intellegencia URL Rewiter and I've written rules like this: <rewriter> <rewrite url="^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css| \.js|.axd|.swf)(\?.+)?)$" to="$1" processing="stop"> <rewrite url="Home" to="~/Default.aspx" processing="stop"> <rewrite url="Company" to="~/Contents.aspx?id=1" processing="stop"> <rewrite url="Vision" to="~/Contents.aspx?id=2" processing="stop"><rewrite url="Congrats/(.+)/(.+)/(.+)" to="~/Contents.aspx? id=26&fn=$1&ln=$2&un=$3" processing="stop"> </rewrite> </rewrite></rewrite></rewrite></rewrite></rewriter>

    <rewriter>
        <rewrite url="^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|
    \.js|.axd|.swf)(\?.+)?)$" to="$1" processing="stop" />
        <rewrite url="Home" to="~/Default.aspx" processing="stop" />
        <rewrite url="Company" to="~/Contents.aspx?id=1"
    processing="stop" />
        <rewrite url="Vision" to="~/Contents.aspx?id=2" processing="stop" /
    >
        <rewrite url="Congrats/(.+)/(.+)/(.+)" to="~/Contents.aspx?
    id=26&amp;fn=$1&amp;ln=$2&amp;un=$3" processing="stop" />
    </rewriter> 

    <rewriter><rewrite url="^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css| \.js|.axd|.swf)(\?.+)?)$" to="$1" processing="stop"><rewrite url="Home" to="~/Default.aspx" processing="stop"><rewrite url="Company" to="~/Contents.aspx?id=1" processing="stop"><rewrite url="Vision" to="~/Contents.aspx?id=2" processing="stop">Now, the problem is that when I am on "Congrats" page, it takes me to congrats page and its the url at that time: http://localhost:52726/URLRewriteTest/Congrats/querystring1/querystring2/querystring3. Now, on congrats page, when I click on Home, then it takes me to Home page as defined in rules but all images looses its correct path and rather than url http://localhost:52726/URLRewriteTest/Home, it shows url http://localhost:52726/URLRewriteTest/Congrats/querystring1/querystring3/Home.</rewrite></rewrite></rewrite></rewrite></rewriter>

    <rewriter><rewrite url="^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css| \.js|.axd|.swf)(\?.+)?)$" to="$1" processing="stop"><rewrite url="Home" to="~/Default.aspx" processing="stop"><rewrite url="Company" to="~/Contents.aspx?id=1" processing="stop"><rewrite url="Vision" to="~/Contents.aspx?id=2" processing="stop"> Moreover, now on this page, all images disappears because of wrong path as it tries to find images in http://localhost:52726/URLRewriteTest/Congrats/querystring1/querystring2/images directory (that is of course wrong path) rather than http://localhost:52726/URLRewriteTest/images directory. Please help me to sort out this problem. </rewrite></rewrite></rewrite></rewrite></rewriter>

    <rewriter><rewrite url="^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css| \.js|.axd|.swf)(\?.+)?)$" to="$1" processing="stop"><rewrite url="Home" to="~/Default.aspx" processing="stop"><rewrite url="Company" to="~/Contents.aspx?id=1" processing="stop"><rewrite url="Vision" to="~/Contents.aspx?id=2" processing="stop">Thank You, </rewrite></rewrite></rewrite></rewrite></rewriter>

     

    Friday, February 25, 2011 7:09 AM

All replies

  • User-42918493 posted

    Give full path of images..

    <img  src="http://localhost:52726/URLRewriteTest/images/yourimage.jpg"/>

    Friday, February 25, 2011 11:34 PM
  • User894003439 posted

    Hi!

    Thank you Stanly for your response.

    But my problem insn't resolved fully. My problem is "wrong" URL. When I am on Congrats/querystrin1/querystring2/querystring3 and click on Home then I want it should take me to Home simply rather it takes me to Congrats/querystring1/querystring2/Home that is not correct. It'll definately cause problem as at this point if again I'll go to Congrats/querystring1/querystring2/querystring3 page then the URL will be like this: Congrats/querystring1/querystring2/Congrats/querystring1/querystring2/querystring3 and there will be no end of it I think. So, I think there is something else I am missing, I guess. Maybe some rules needs to add/change. But I've no idea about it.

    Please guide me to sort out this issue.

    Thank You,

    Saturday, February 26, 2011 3:20 AM
  • User894003439 posted

    Am I the only 1 in the world who is facing problem with multiple query strings using Intelligencia Rewriter??? Have not anyone else in the worlds tried it for multiple querystring ever yet?

    Monday, February 28, 2011 2:51 AM
  • User-2129916496 posted

    No you are not the only one in the world now we are two Laughing, am trying to solve it , if you knew how to solve it please 

    spread the word.

    Thanx

    Tuesday, April 12, 2011 7:57 AM
  • User894003439 posted

    Couldnt solve it yet... unfortunately Frown

    Monday, April 25, 2011 8:07 AM