404 Error

 404 Error + Redirect Your URL to Home Pages
---------------------------------------------------------
#Create .htaccess File and paste below information in that file, replace all example(domain name) to original name
#Create 404 page.
Save first file as .htaccess and second 404.html
--------------------------------------------------------------------------


Options +FollowSymLinks

RewriteEngine on



# index.php to Root Directory

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/

RewriteRule ^(.*)index\.php$ /$1 [R=301,L]



# Redirect example.com to www.example.com

RewriteCond %{HTTP_HOST} ^example\.com

RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]



# 404 Error Page Implementation

ErrorDocument 404 /404_Error.php


#For more info...
#http://www.phpro.org/articles/Custom-404-Error-Page.html

No comments:

Post a Comment