Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 19th, 2004, 10:06 AM
Authorized User
 
Join Date: Nov 2004
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default 404 error

i dont know if i'm in the right catogary for PHP to ask this type of question, i wanna code for PHP to create a 404 error on my page.

ex: if the viewer enterted mysite.com/something.html i wanna show a 404 wanna enter a 404 error on my site, not just for one url but everytime he tried to enter a mistaken address.




Plz can u help me
[God bless the week and strong]

Reply With Quote
  #2 (permalink)  
Old December 19th, 2004, 11:36 AM
Authorized User
 
Join Date: Jul 2004
Location: rajshahi, , Bangladesh.
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to rajuru Send a message via Yahoo to rajuru
Default

You may go to PHP Begginers Room
anyway to do such follow the instruction:
1. Design a custom error page
2. Save it as error.php or you like best and upload to your public_html directory
3. Add the following line to your .htaccess file

     ErrorDocument 404 /error.php

4. From Now every request for wrong page will redirected to this page


Best Regard:
Md. Zakir Hossain (Raju)
www.rubd.net
www.xenex.rubd.net
www.forum.rubd.net
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
catch 404 error danielnixon ASP.NET 2.0 Basics 1 May 1st, 2008 06:57 PM
Error 404 SeniorNSU BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 August 30th, 2006 11:09 AM
404 error DARSIN .NET Framework 2.0 1 March 24th, 2005 06:04 AM
404 - File not found error geeta Classic ASP Professional 1 October 23rd, 2004 09:25 AM
Error 404 jackps Dreamweaver (all versions) 2 January 15th, 2004 09:29 AM



All times are GMT -4. The time now is 10:12 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.