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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

redirect url ?

Status
Not open for further replies.

hisham

IS-IT--Management
Nov 6, 2000
194
The main page in my website was index.html, after updating the site using php the main page no is index.php.
The problem is: there are many pages in the site have a link to index.html
How can I redirect users to index.php when they request index.html?
thanks in advance
 
just change the source of index.html to

Code:
<html>
<head>
<meta http-equiv=&quot;refresh&quot; content=&quot;0; URL=index.php&quot;> 
</head>
</html>
 
Or if you are using Apache, you could put this in a .htaccess in the directory:
Code:
RedirectPermanent /index.html /index.php
//Daniel
 
Or use Javascript:

<script>
<!--
location=&quot;index.php&quot;;
//-->
</script> Don't eat yellow snow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top