Click to See Complete Forum and Search --> : HTTP 404 error


jeny
01-23-2007, 11:18 PM
Hi all,

if a link is clicked (like this http://myhost.com/new/welcome.php) and the if the page does not exists i want to move it to HTTP 404 error page. how shall i do this?

NightShift58
01-23-2007, 11:43 PM
Usuall in the .htaccess file and the line would look something like this:ErrorDocument 404 /errordocs/error404.htmlYou can also do that in your Apache config, if you have access to it.

jeny
01-23-2007, 11:52 PM
how to do .htaccess file. what is its use? where should i store it? i am newbee to php. can you please help me??

NightShift58
01-24-2007, 12:10 AM
.htaccess doesn't have a lot to do with PHP.

I barely know my way around it, so maybe someone else looking in can help.

In the meantime, you can do some reading at:
http://httpd.apache.org/

jeny
01-24-2007, 12:14 AM
can yout please give an example that has .htaccess included

NightShift58
01-24-2007, 12:17 AM
This is a better link:
http://httpd.apache.org/docs/1.3/howto/htaccess.html