Guest Posted October 20, 2005 Posted October 20, 2005 I need the code to redirect customers who type in the wrong address, example: www.mysite.com/wrongpage.php and direct them back to our index.php page. Can anyone help? Thank you.
Guest Posted October 21, 2005 Posted October 21, 2005 change your "file not found" file on your server and redirect to index.php Michael here is a sample redirect. make sure you change line 3 and enter your website. <HTML> <HEAD> <meta http-equiv="refresh" content="3;url=http://www.yoursite.com/index.php"> <TITLE>301 Not Found</TITLE> </head> <body bgcolor="#EBE2CB" text="#000000"> <p> </p> <p align="center"><font size="5">We have upgraded our site.</font></p> <p align="center"> </p> <p align="center"><font size="5">You will be redirected to our Home Page in approximately 3 seconds. </font></p> <p align="center"> </p> <p align="center"><font size="5">Please make a new bookmark.</font></p> </body></html>
alihelp Posted October 21, 2005 Posted October 21, 2005 Alihelp In Linux make a file ".htaccess" Content for ".htaccess" file>> ----------------------------------- DirectoryIndex index.html ErrorDocument 404 /404e.php ------------------------------------- here is a sample redirect. make sure you change line 3 and enter your website. ============= Content of 404e.php ========== <HTML> <HEAD> <meta http-equiv="refresh" content="3;url=http://www.yoursite.com/index.php"> <TITLE>301 Not Found</TITLE> </head> <body bgcolor="#EBE2CB" text="#000000"> <p> </p> <p align="center"><font size="5">We have upgraded our site.</font></p> <p align="center"> </p> <p align="center"><font size="5">You will be redirected to our Home Page in approximately 3 seconds. </font></p> <p align="center"> </p> <p align="center"><font size="5">Please make a new bookmark.</font></p> </body></html>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.