I am planning to implement an URL redirector module(Let's say Socket server running at 7000), which takes the URL requests and redirects them to one of the other Servers but the PATH will be same. All these other servers will have their data bases replicated and they have same paged and procedures.
User will connect to my server by typing http://abc.foo.com:7000/index.html
on the browser. I read the request and I reconstruct the new URL as http://def.foo.com:7777/index.html
and redirects the browser to the new URL by sending 301 Status and by using Location:<newURL> Tag.
Now here are the questions.
1. When I use the Location: tag syntax , the address on the address bar of the browser is getting replaced with http://def.foo.com:7777/index.html
. Is it not possible keep this value on the address bar unchanged i,e http://abc.foo.com:7000/
? The PATH could be changed. Is there any way in which browser internally connects to http://def.foo.com:7777/index.html
2. With the address changing behaviour of this URL redirection, let's say there is a form on the page http://def.foo.com:7777/index.html
. User will fill that form and submit to some procedure by giving href as http://abc.foo.com:7000/prodedure
My server running at port 7000 will construct a new URL http://ghi.foo.com:7777/procedure
and redirects the browser to it. Will that data filled up by the user be available to this procedure on http://ghi.foo.com:7777