Custom 404 Error Page with htaccess

 

Custom 404 Error Page with htaccess

Add the following line to the .htaccess file

ErrorDocument 404 /errors/404.php

ex .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
ErrorDocument 404 /errors/404.php
</IfModule>

Upload 404.php file to /errors/ folder.

404.php can redirect to homepage, ex:
Redirection url with META Refresh:

<html>
<head>
<meta http-equiv=”refresh” content=”0;url=http://www.new-url.com“>
</head>
<body>
This page has moved to <a ref=”http://www.new-url.com“>http://www.new-url.com</a>
</body>
</html>


  1. 1 Trackback(s)

  2. 404 woes.. - vBulletin SEO Forums

Post a Comment



We use third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you.