Click to See Complete Forum and Search --> : Onload Redirect Question


nodo
01-19-2009, 04:25 PM
Hi all,

I would like to know if it's possible to add some code to our homepage that looks to see what url has been typed, and if it matches a string, then redirect to another url.

That is, when you go to http://www.organdonor.gov.au, it automatically takes you to http://www.medicareaustralia.gov.au. I would like it to automatically redirect to http://www.medicareaustralia.gov.au/provider/patients/aodr/index.jsp

Is this possible by adding some javascript in the index page of the homepage?

Cheers,
Neil

Charles
01-19-2009, 06:51 PM
Yes, but...There are several ways of doing this but they are all iffy in the "actually works" department. Best to come up with a better solution.

buntine
01-19-2009, 11:07 PM
...Such as setting up a 301 redirect from the server.

Here are a bunch more alternatives: http://en.wikipedia.org/wiki/URL_redirection