Create Account
Sign In

Custom 404 error pages - php url rewrite ErrorDocument not found htaccess


Custom 404 error pages - php url rewrite ErrorDocument not found htaccess Custom 404 error pages - php url rewrite ErrorDocument not found htaccess The 09/08/2010 at 19:02:02
Rating: 4/5
Keywords: custom 404 error pages not found htaccess customize url rewrite 404 error php trick ErrorDocument 404 custom erro page htaccess apache http error

Hi,
In this tutorial, I will show you how to create custom 404 error pages.
First, you have to create a .htaccess file in the root of your web site.

This is the content of your .htaccess file:
.htaccess
ErrorDocument 404 /erreur_404.html
Then, you have to create the page erreur_404.html, she will be the custom 404 error page:
<h1>404 Error</h1>
<h3>The page you are looking for does not exist.</h3>

If you want to customize other errors you only have to add another line in the .htaccess file and to create the custom page of your error.

I hope this trick will be useful.

Similar Scripts and Tutorials

PHP Redirection (Header and URL Rewrite) - redirect php page header location RewriteRule PHP Redirection (Header and URL Rewrite) - redirect php page header location RewriteRule Secure a folder .htaccess .htpasswd - protect a directory with htaccess and htpasswd Secure a folder .htaccess .htpasswd - protect a directory with htaccess and htpasswd Go to previous and next page in Javascript - history object Go to previous and next page in Javascript - history object PHP Script execution timer - loading page microtime timer execution time PHP Script execution timer - loading page microtime timer execution time Should a PHP developer learn Java or Python to use Hadoop? Should a PHP developer learn Java or Python to use Hadoop?