How to redirect when file not found
Could you give me a clue how to redirect to a specific page when a page not found by a visitor?
Thanks in advance!
Place this code inside the <head> tag of the file named 404.shtml in you home directory (create one if not found) :
0 is the number of seconds the server waits till it redirects.
<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.example.com/">
http://www.example.com is the url u want the user to be redirected to.
That assumes a specific setup on the webserver, one that is by no means the norm. How you do this depends on your server, but for Apache the normal method is to specify an ErrorDocument directive in a .htaccess file.
This page explains the basic idea and contains code for Apache.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)