Welcome Guest ( Log In | Register)



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Custom 404 Error Pages, A Tutorial On How To Make Custom 404 Error Pages
jerrylili
post Jun 25 2005, 02:27 AM
Post #11


Member [Level 1]
****

Group: Members
Posts: 63
Joined: 22-June 05
Member No.: 8,561



Hallo,

hi your tutorial is like the automated thing on cpanel. i did that insted of yours they the same. BUT i want a custom imaged and other stuff like a real page as a 404 error page, not just a simple OVERLY SIMPLE text page. I want to crearte my custom layout error with graphics and all. like .htm, anf make it fancy.

i want to do that? i have created teh page but how do i point vosters to that when they have 404 error??

thanks,
hellp
party
yeao,
jerryjman
Go to the top of the page
 
+Quote Post
guangdian
post Jun 25 2005, 02:33 AM
Post #12


Trap Grand Marshal Member
***********

Group: Members
Posts: 1,183
Joined: 24-September 04
Member No.: 1,245



i think just on the cpanel you can find the 404 pages setup.
yes.on cpanel you can modify it with your own mind..
Go to the top of the page
 
+Quote Post
jerrylili
post Jun 25 2005, 04:05 AM
Post #13


Member [Level 1]
****

Group: Members
Posts: 63
Joined: 22-June 05
Member No.: 8,561



hi man,

yes yes, your are right but man, i do that and thats't the same as this tutorial, all it does is create a txt file with what ever you want to say. i WANT to design the page in dreamweaver + fireworks+photoshop CS and graphc it. and then use that as 404 error. not a txt doc.

i just need so that everytime teh address is wrong, it automaticly goes to mine coustome 404 error page.

help,
thaks,
party on board,
jerryjamn barcardi by night man by day
Go to the top of the page
 
+Quote Post
rvalkass
post Jun 25 2005, 08:40 AM
Post #14


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,116
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



To use a custom .html (or any other type of file) as an error 404 you must use the code stated at the start of this thread:

CODE

ErrorDocument 404 /myerrorpage.html


Where myerrorpage.html is the name of the page you want to display as an error 404.

You do not need to put /public_html/ or anything like that, just the name of the file, or if it is in a folder called errors, then put /errors/404.html
Go to the top of the page
 
+Quote Post
NeXDesigns
post Jun 25 2005, 08:55 PM
Post #15


Super Member
*********

Group: Members
Posts: 260
Joined: 12-August 04
From: Hurricane Alley, Florida
Member No.: 770



this will do .php error pages aswell right? and what about when a page is called from a sub directory that results in an error, will the script try to call /subdir/404.php instead of /404.php?

and whats the php code to get a users ip, and the page they came from, or were going to?
Go to the top of the page
 
+Quote Post
rvalkass
post Jun 26 2005, 07:38 AM
Post #16


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,116
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



That will work for .htm .html .php .asp .mp3 .jpg ... Any file can be called as an error page (as far as I am aware).

It won't look for /subdir/404.php if you put the .htaccess in the /public_html/ folder directly. This will apply your error page to all sub folders, but won't include the sub folder name in the search for the file.

The user's IP can be taken with the following line of code:
CODE

$ip = $_SERVER['REMOTE_ADDR'];


You can resolve that IP address with the following code (in place of what is above):

CODE

$resolve = GetHostByName($_SERVER['REMOTE_ADDR']);


To get the page that the user came from you can use the code:

CODE

$referrer = $_SERVER['HTTP_REFERER'];

/* That can sometimes fail as some browsers stop it being sent, so you could try this if it doesn't work */

$referrer_uri = $_SERVER['REQUEST_URI'];


I don't think it is possible to find out what page a user was going to, as it will be changed to your 404.php anyway.

I hope this helps you.
Go to the top of the page
 
+Quote Post
Adamrosso
post Aug 8 2005, 09:38 AM
Post #17


Advanced Member
*******

Group: Members
Posts: 128
Joined: 6-August 05
Member No.: 10,402



Using notepad can make .htaccess... just save it as all files and as .htaccess
Go to the top of the page
 
+Quote Post
iGuest
post Jan 18 2008, 02:38 PM
Post #18


Trap Double Mocha Member
***************

Group: Members
Posts: 2,360
Joined: 21-September 07
Member No.: 50,369



What is 404 error and I need help fixing it?
Custom 404 Error Pages

I am trying to download the new yahoo instant messenger. I can get almost the whole thing to download when all the sudden I get "404 not found". What the heck is this?

I never got the error when I downloaded on Windows Millennium. Now I have windows XP and having problems. I am not any computer guru so if someone could talk me through this with very clear and easy instructions it would be greatly appreciated.

-denise
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Howto#1: Custom Bbcodes On Ipb(0)
  2. Howto#2: Custom Bbcodes For Ipb (marquee)(0)
  3. Test Your Php Pages W/o Upload/internet(57)
  4. How To Block Google Web Accelerator(6)
  5. ---> Ftp Error Codes What They Mean <---(3)
  6. How To Edit Your "index Page"(0)
  7. 404 Error Page(4)
  8. Change / Modify The Title Bar Text In IE6 Or FF(3)
  9. How To: Make A Simple Php Site(21)
  10. Custom Bbcode Tags In Smf(0)
  11. A Full Error Protected Php Contact Form(3)
  12. Making A Dynamic Page On Blogspot(5)
  13. Psp Error- Tut On How To Fix(30)
  14. Tutorial: Creating Custom Icons For Devices(0)
  15. Document Type Declarations(0)
  1. Do You Want To Use Php Code In Your Html Pages?(9)
  2. Php--> Content-only Pages(9)
  3. Simple Javascript And Password System(6)
  4. Create Dynamic Html/php Pages Using Simple Vb.net Code(1)