locked
URL rewriting based on previous url RRS feed

  • Question

  • User33581331 posted

    Hello,

    Is there a way of implementing an httpmodule to do a querystring on the previous URL and then rewrite the current URL based on that queryString?

    Is it possible? Is it the best way of doing it? Maybe a dll that will overwrite the Page_Load event is better...?

    Thank you

    Friday, May 11, 2007 9:37 AM

Answers

  • User-900677162 posted

    Hi,ias0nas:

    I have posted a sample of URL rewriting by using HttpModule. You can refer to here:

    http://forums.asp.net/thread/1706422.aspx

    I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 13, 2007 9:39 PM

All replies

  • User-1315512054 posted

    hi,

    Yes, you could implement the logic into page load event, but if you would like to redirect all requests from http://www.firstSite.com to http://www.secondSite.com (wich sites are yours) much better is to do in IIS with permament redirect, in the Redirect to: you should enter:  http://www.secondSite.com$S$Q

    $P - Passes parameters that were passed to the URL to the new URL.

    $Q - Passes the parameters including the question mark.

    Regards

    Friday, May 11, 2007 10:14 AM
  • User-900677162 posted

    Hi,ias0nas:

    I have posted a sample of URL rewriting by using HttpModule. You can refer to here:

    http://forums.asp.net/thread/1706422.aspx

    I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be of assistance

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, May 13, 2007 9:39 PM