locked
Url rewriting and login RRS feed

  • Question

  • User95338910 posted

    Hi all,

    I've tried finding a solution amongst all the other posts but haven't managed to quite find one that describes my problem. However, I'm not too sure what to search for either...

    I'm using UrlRewritingNet.UrlRewriter.dll and I don't have a problem with with the rewrites. My problem occurs when someone wants to login to the virtual path. My rewrite config:

    <add name="rewrite1" virtualUrl="~/VirtualPath/(.+).aspx" destinationUrl="~/Destination/Category.aspx?Cat=$1" />

    I browse to:

    http://www.TheDomain.com/VirtualPath/Car.aspx

    So far all good...

    At this point I login. On the login page, the url displayed lookes like this:

    http://www.TheDomain.com/login.aspx?ReturnUrl=%2fVirtualPath%2Car.aspx%3fCat%3dCar

    And after logging in:

    http://www.TheDomain.com/VirtualPath/Car.aspx?Cat=Car

    When I now try to retrieve the value for "Cat" query string variable, I get "Car,Car"


    I've tried using control adapters as described by Scott but without luck.

    http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx


    Can someone explain to me why this is happening and how to fix it? Much apreciated.

    Rob



    Sunday, December 20, 2009 9:00 PM

Answers

  • User78336405 posted

    Hi,

    URL rewriting can be implemented either with ISAPI filters at the IIS Web server level, or with either HTTP modules or HTTP handlers at the ASP.NET level. It is up to you to deceide what is your project. For more details, please refer:http://msdn.microsoft.com/en-us/library/ms972974.aspx

    And UrlRewritingNet.UrlRewriter.dll beyond this forum's ability. Please refer the offical website:http://www.urlrewriting.net

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 23, 2009 3:53 AM