For smart Primates & ROBOTS (oh and ALIENS ).

Blogroll

Thursday, May 22, 2014

Page not found error 404 message customize in php


Page not found error 404 message customize in php.


1) if you have the local server "http://localhost" and you site root folder is "/test/myht/" then your url will be as:
"http://localhost:90/test/myht/"
create a file "404.html" or any other name. and paste the message as :
<h1> My custome error message for file not found.. file not found </h1>


2)Create ".htaccess" file and make the listed below entry

RewriteEngine on
ErrorDocument 404 /test/myht/404.html

if WAMP or LAMP is alreay "ON" the restart it.
open browser and try to url as:
http://localhost/test/myht/1.html

you will found your customization message as:

"My custome error message for file not found.. file not found".
Share:

0 comments:

Post a Comment

Add Dependent Scripts

   here is the code that allow to add dependent script :         <script>         const addDependentScripts = async function( scriptsT...

Ads Inside Post

Powered by Blogger.

Arsip