Forum Moderators: phranque

Message Too Old, No Replies

Rewrite host name with POST data

Rewrite host name - POST data is lost

         

BabuK

8:54 pm on Mar 11, 2011 (gmt 0)

10+ Year Member



Need help!

Let me explain what I am trying to do

I have
url 1: www.abc.com
url 2: www.xyz.com

I have multiple forms which are posting to an application with url 1: www.abc.com/abc1

I want to rewrite the above url on post and also show in the browser as www.xyz.com/abc1

I tried to redirect, but I lose the POST parameters during redirect.
Tried to internally rewrite with [P] option but I don't see the host name getting changed in the browser.

Any help is appreciated!

Demaestro

9:37 pm on Mar 11, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can I ask why you don't make the action of the form www.xyz.com/abc1?

g1smd

9:44 pm on Mar 11, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Memory might be playing up, but I believe that redirecting POST is not possible.

It's a security issue.

BabuK

9:54 pm on Mar 11, 2011 (gmt 0)

10+ Year Member



Thanks for the replies..

Can't make www.xyz.com/abc1 , coz I've lots of customers websites using www.abc.com/abc1

Now I do not want to change in all their websites :-( ..instead
redirect their post data and url to xyz.com

jdMorgan

10:19 pm on Mar 17, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use server-side scripting to modify the POST URL in the form page's code before that form page is served to the visitor. This could be a bit of PHP in the page, or just Apache SSI (see Apache mod_includes).

Alternately, do the domain redirect when the form page is initially requested, not when the form is POSTed.

Jim

BabuK

4:18 am on Mar 18, 2011 (gmt 0)

10+ Year Member



Thx Jim. Have wrote a servlet that rebuilds with new url with post data and posts it again. Working now! Thx All