Redirect posted URL RRS feed

  • Question

  • User1570641812 posted

    I am attempting to write an HttpHandler that will get the url that a page posts to and change the address. i.e. a user clicks a button on the form that posts to http://www.website.com. When the http handler gets this post, I want to change this to http://dev.www.website.com. resulting in the url going to the development server instead of the live server. This way no special coding has to be done to keep all links within the development environment. I tried checking the rawurl and url values but all I am seeing is the url of the page that is doing the posting. Am I trying to do this in the right place?




    Monday, March 12, 2007 1:47 PM

All replies

  • User-1087479560 posted
    Try this one:

    Hope it helps.
    Thursday, March 15, 2007 3:57 AM
  • User1570641812 posted

    Thanks for the tip Raymond but all that returned was the current location not where I am trying to post to. I actually went through all 54 of the ServerVariables and none of them referred to where the post is going. What I tried was trying this in the ProcessRequest procedure of the handler using context.Request.ServerVariables["PATH_INFO"].




    Friday, March 23, 2007 3:28 PM