We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
Custom 404.
Topic Started: May 19 2005, 07:26 AM (727 Views)
Zero Resistance-ZNS
eÜil Zero lÖrd™
[ *  *  *  * ]
Okay...So I know minimal JS and PHP. I would like this for my site. Any way how?
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Make an html page, and save it as 404.shtml
Offline Profile Quote Post Goto Top
 
James
Live to Dream
[ *  *  *  *  *  *  * ]
Does that work on absolutely any host? I thought you had to modify the .htaccess sometimes?
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
Yup. Create a file called ".htaccess", and put in it the following:

Code:
 
ErrorDocument 404 /errorpage.html


Then just put a file named errorpage.html with the error message. Htaccess if a way of configuring the server from a sub directory.
Offline Profile Quote Post Goto Top
 
ultra mc
Member Avatar
Im from the ment-al-in-sta-tute
[ *  * ]
:phrank: :geek: :alien: :angel: :arr: :qb: :smithster: :) :P
Offline Profile Quote Post Goto Top
 
Rory
i;m a mess
[ *  *  *  *  *  *  * ]
mmmk, thats just spam. Here's an idea:

Read the Board Rules!
Offline Profile Quote Post Goto Top
 
Jory
Member Avatar
Member
[ *  *  *  *  *  * ]
Gornakle
May 19, 2005 03:48 PM
Yup. Create a file called ".htaccess", and put in it the following:

Code:
 
ErrorDocument 404 /errorpage.html


Then just put a file named errorpage.html with the error message. Htaccess if a way of configuring the server from a sub directory.

I assume you could make a page for every error you want that way?
(Not that there are a lot of other errors you get a lot :ermm: )
Offline Profile Quote Post Goto Top
 
Gornakle
Member
[ *  *  *  *  * ]
Qj
May 19, 2005 05:42 PM
I assume you could make a page for every error you want that way?
(Not that there are a lot of other errors you get a lot :ermm: )

Sure. Just use something like:

Code:
 
ErrorDocument 400 /errors/400.html
ErrorDocument 401 /errors/401.html
ErrorDocument 403 /errors/403.html
ErrorDocument 404 /errors/404.html
ErrorDocument 500 /errors/500.html
Offline Profile Quote Post Goto Top
 
JoeC
Euch! IE tastes horrible!
[ *  *  *  *  * ]
I'm not entirely sure, but I believe just calling it "404.shtml" or "401.shtml" etc, automatically points it to that page. I think.
Offline Profile Quote Post Goto Top
 
Rory
i;m a mess
[ *  *  *  *  *  *  * ]
I think it is depending on your server configuration, which James queried earlier. I know on one of my hosts the xxx.shtml method works, haven't tried it on the other host, but i am unsure as to whether it is possible on all configs or not.
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
It doesn't always work. My old server did not allow it.

(By old i do stress old. I think most modern servers allow the easy way)
Offline Profile Quote Post Goto Top
 
Lothlómendil
Member Avatar
Spam Queen
[ *  *  *  *  *  *  * ]
Rory
May 19, 2005 12:19 PM
mmmk, thats just spam. Here's an idea:

Read the Board Rules!

You were too nice. I was either going to send him a nasty PM about it or just suspend him until I read your post. :arr:

Anyhow, this topic reminds me that I have to figure out what's up with my 404.php file on my blog. :ermm:
Offline Profile Quote Post Goto Top
 
JoeC
Euch! IE tastes horrible!
[ *  *  *  *  * ]
If you have cPanel, you can edit the pages in there, and it'll automatically update your .htaccess - dead easy :P
Offline Profile Quote Post Goto Top
 
solinent
Member
[ *  *  * ]
Okie, here's the deal:

With apache servers, you can do the ".htaccess" thing.

However, me, with my innocent Internet Information Services server, I have to edit the configuration via(on the server obviously...) Start>Settings>>Control Panel>>>Administrative Tools>>>>Internet services manager, Then right click the site that is yours, and select properties. After that go to Custom errors, then click on the errror you wish to change, and then make sure it's a url, then give the name of a file that's on the site that you want the error page to be on.

One way to check if its an IIS server, or apache, is if you don't have custom errors set up allready, then trigger an error. If it's IIS, it'll say somewhere on the page that it is IIS(after all the points on what to do), and if it's Apache, then the error will be different, and possibly might say something else.

Obviously, it could be another server, but I think those are the two most common.

:) :w00t: Good luck on that!
Offline Profile Quote Post Goto Top
 
Zero Resistance-ZNS
eÜil Zero lÖrd™
[ *  *  *  * ]
Joezif
May 19, 2005 05:26 PM
If you have cPanel, you can edit the pages in there, and it'll automatically update your .htaccess - dead easy :P

So rthat means i just put a 404.htm?

Ah, I found something in SubDomain stuffs.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Technology Chat · Next Topic »
Add Reply
  • Pages:
  • 1