Click to See Complete Forum and Search --> : 404 Pages


aoeguy
10-19-2003, 09:10 AM
How with PHP/CGI... could I:
Check if the page exists that the user goes to, if not then show the 404 page

I dont know what script it would use :(

Khalid Ali
10-19-2003, 10:12 AM
That is webservers default behavior,You can make your apache webserver to point to a particular page for a particular error though.

aoeguy
10-19-2003, 10:29 AM
I downloaded a php script for it. Just need to wait until the new server is up.

Robert Wellock
10-20-2003, 11:49 AM
Why not use the: .htaccess it is far easier.

aoeguy
10-20-2003, 11:51 AM
What would I need to add in the file???

aoeguy
10-20-2003, 11:55 AM
Found the answer! :)

aoeguy
10-20-2003, 12:21 PM
Wont work!

.htaccess file looks like this

# Error page config
Options -Indexes
ErrorDocument 403 "You may not access this page".
ErrorDocument 404 public_html/404.htm
ErrorDocument 500 "Server Error"

Robert Wellock
10-21-2003, 09:28 AM
It depends upon how the server is set-up though the following should work; obviously change the "somefilename.htm" to your error message webpage.

ErrorDocument 404 /somefilename.htm