Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Instant Page redirect 1

Status
Not open for further replies.

Bravogolf

Programmer
Nov 29, 2002
204
GB
Hi all.
I have a webpage, the index file, and I want it to redirect to a php file instead.

At the moment I am using:
Code:
<meta http-equiv="Refresh"
content="0;url=http://www.url.com/index.php">

But this is a little slow as it seems to load the page first then executes the above statement!
What I would like is an instant redirection to the index file, does anyone know how to do this?

Apologies, btw, if this is a silly question, but I checked the FAQ's and couldn't find anything useful
 
I was going to suggest using <body onload="blah"> but you said you don't want to wait for the whole page to load first. So instead just put this at the top of your page:
Code:
<script language=javascript>
document.location = "[URL unfurl="true"]http://www.url.com/index.php";[/URL]
</script>


-kaht

banghead.gif
 
Thank you very much kaht! That's exactly what I was looking for.

/Tips hat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top