Menu

#134 Postback does not work using Url Rewrite

open
nobody
None
5
2007-10-15
2007-10-15
No

Loading an url with parameters, works fine, for example:

Quote:
http://localhost/page.aspx?id=id-name&city=Edimburgh

But calling the page trough an UrlRewriting.net rule, every postback is ignored, for example:

Quote:
http://localhost/Edimburgh/id-name.aspx

Example rule for UrlRewriting.net at Web.Config:

<urlrewritingnet rewriteOnlyVirtualUrls="true" contextItemsPrefix="QueryString" defaultPage="default.aspx" defaultProvider="RegEx" xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>
<add name="RewriteRule1" virtualUrl="^~/(.*)/(.*).aspx" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/page.aspx?id-name=$2&amp;city=$2" ignoreCase="true" />

</rewrites>
</urlrewritingnet>

Discussion

  • Nobody/Anonymous

    Logged In: NO

    I had a post about this up over a year ago but it was removed. I had the solution posted as well under the forum user 'BLIEB'.

     
  • Andy Miller

    Andy Miller - 2007-12-08

    Logged In: YES
    user_id=1245761
    Originator: NO

    Nobody removed anything from this tracker. In fact, there is no remove or delete function in the SourceForge trackers. At least, not one that I can see. Perhaps your filters are excluding the previous post.

    In any case, this is not a bug in Anthem.

    The javascript function that builds the callback URL will take the action parameter from the first form on the page and append "Anthem_Callback=true". If your url rewriting rule strips off the Anthem_Callback querystring parameter, then Anthem will not handle the callback.

     

Log in to post a comment.