Well i'm trying to make a 404 page not found page but i'm running out of idea how to start it and how i can make it work... can anyone help me out about this page?
well i do coded a bit of it but i guess its wrong..
any help would be appreciated.
404 page not found page
Page 1 of 110 Replies - 1322 Views - Last Post: 19 February 2012 - 10:05 AM
Replies To: 404 page not found page
#2
Re: 404 page not found page
Posted 19 February 2012 - 02:39 AM
404 pages have nothing to do with php coding. All errors are handled by the webserver.
Are you using Apache or IIS?
Are you using Apache or IIS?
#3
Re: 404 page not found page
Posted 19 February 2012 - 02:54 AM
no2pencil, on 19 February 2012 - 02:39 AM, said:
404 pages have nothing to do with php coding. All errors are handled by the webserver.
Are you using Apache or IIS?
Are you using Apache or IIS?
Apache and umm what i want to do is like this
http://www.google.com/adawdawd
because some users bookmark a certain url like
www.freecookies.com/pages.php
and if its renamed or deleted .. it should show a page not found thing..
#4
Re: 404 page not found page
Posted 19 February 2012 - 03:00 AM
View httpd.conf & look for the line containing : ErrorDocument 404
#5
Re: 404 page not found page
Posted 19 February 2012 - 07:52 AM
#6
Re: 404 page not found page
Posted 19 February 2012 - 07:56 AM
Then you either edit that line to point to your 404 file, or you just edit the file it's currently using.
After you edit the file, you will need to restart the Apache service before the change will take effect.
After you edit the file, you will need to restart the Apache service before the change will take effect.
#7
Re: 404 page not found page
Posted 19 February 2012 - 08:02 AM
Syfer, on 19 February 2012 - 02:52 PM, said:
then whats next?
Change the line so that it points to your new 404 page. Most properly configured Apache servers allow you to put .htaccess files in the root of your website, where you can define this type of stuff. So if you create a page called "Error404.html" in the root of your website, you can just put: ErrorDocument 404 /Error404.html inside a .htaccess file, and now every time a user requests a page that does not exist on that website, your "Error404.html" page will be shown.
Quote
because some users bookmark a certain url like
www.freecookies.com/pages.php
and if its renamed or deleted .. it should show a page not found thing..
www.freecookies.com/pages.php
and if its renamed or deleted .. it should show a page not found thing..
Actually, if it is renamed or moved, you should return a 301 error and redirect them to the new page. The 301 error tells the browser that the page has been moved permanently, and if they have bookmarked the old URL that they should update the bookmark. (Not sure if browsers actually honor that last bit.)
#8
Re: 404 page not found page
Posted 19 February 2012 - 08:31 AM
i already changed it but nothing happened
p.s
yes i did restart it already.
#ErrorDocument 404 /error.php
p.s
yes i did restart it already.
This post has been edited by Syfer: 19 February 2012 - 08:31 AM
#9
Re: 404 page not found page
Posted 19 February 2012 - 08:32 AM
You need to remove the comment character (#). save the file & restart.
You should spend a good half an hour to an hour reading over all of the options of the httpd.conf config file. It'll explain in painfully exact detail how to use it, & make your webserver perform how you wish.
You should spend a good half an hour to an hour reading over all of the options of the httpd.conf config file. It'll explain in painfully exact detail how to use it, & make your webserver perform how you wish.
#11
Re: 404 page not found page
Posted 19 February 2012 - 10:05 AM
Glad to see you got it working.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|