PDA

View Full Version : multiple url detection and redirect



js1974
03-14-2006, 11:34 PM
I have a need for a script that will detect the url that was typed in, Once the url is determined it will go to 1 site for 1 url and another site for another url. I have played with single redirects based on url detection but multiple is giving me fits. Anyone have one available? I searched through the forums and found a few blocks but nothing for multiple redirects based on url.


synch.xyz detected go here
webmail.xyz detected go here

Thanks in advance
Jason

mwinter
03-15-2006, 02:23 AM
I have a need for a script that will detect the url that was typed inYour post isn't particularly clear, but if I'm reading it correctly, what you ask is impossible due to the nature of basic browser operation. Perhaps you should explain in detail what you need.

Mike

js1974
03-15-2006, 07:28 AM
Ok I have a client that got a hold of me asking to make a page that can redirect to the same site one being a https connection and one being a standard connection.

The client has 2 parked domains on a server 1 is webmail.xyz the other is synch.xyz the use is the synch site is for handhelds and the webmail is for pc users. Problem is even though handhelds support ssl they don't support it correctly and it has caused him a ton of frustration.

So he needs 1 page that can say ok the user typed in webmail.xyz i need to send him to https://webmail.xyz while at the same time haivng the same page be able to detect that the user typed in sync.xyz now I need to redirect him to http://webmail.xyz.

Now personally I told him create 2 websites with a 2 subdomains one for synch that redirects to the http and 1 for webmail that jut loads up webmail. However since he is against this methid I figured I would see if anyone has any idea how to do this via 1 script on 1 page. I agree it's complicated but some people just want things a certain way.

If you need anymore information please let me know in the meantime I will work on getting the client to use 2 subdomains from the user side it should be as seamless as 1 page 1 address.

mwinter
03-15-2006, 10:58 PM
Ok I have a client that got a hold of me asking to make a page that can redirect to the same site one being a https connection and one being a standard connection.

The client has 2 parked domains on a server 1 is webmail.xyz the other is synch.xyz [...]

So he needs 1 page that can say ok the user typed in webmail.xyz i need to send him to https://webmail.xyz while at the same time haivng the same page be able to detect that the user typed in sync.xyz now I need to redirect him to http://webmail.xyz.You should tell him that wants is a very indirect and unreliable approach (perhaps you already did - reiterate it). The server that receives these requests is in a far better position to perform the redirect, and it is guaranteed to do it properly.

For it to work client-side, not only will scripting support be required, but the host would have to provide access to referrer information, which might not even be sent in the first place. Depending on how this one document is reached, it might not even be possible to determine the original entry point without making a determined effort to forward that information (and if that can be done by the server, so can the redirect itself).

Mike