PDA

View Full Version : how to redirct a page



toh
April 22nd, 2004, 08:35 AM
usually our main page is index.html so how can i do when ppl type eg, toh.com/index.html will automatically read my index.php instead of index.html??

pls advice.

Thanx!!

Hans Kilian
April 22nd, 2004, 08:43 AM
Try this in your index.html file


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Your Page Title</title>
<meta http-equiv="REFRESH" content="0;url=http://toh.com/index.php"></HEAD>
<BODY>
Optional page text here.
</BODY>
</HTML>

toh
April 22nd, 2004, 08:48 AM
ya, it works. thanx a lot !!!

λ
April 22nd, 2004, 11:14 AM
Alternatively:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Your Page Title</title>
</HEAD>
<BODY onload="location.href='http://toh.com/index.php';">
Your browser doesn't support JS, <a href="http://toh.com/index.php">click here.</a>
</BODY>
</HTML>