PDA

View Full Version : shtml 404 page


Justin
01-05-1999, 06:34 AM
Can I use an shtml page for my 404 page, or does it have to be 404.hmtl? Just curious, because I use a header and footer for all of my pages, and it would be easier to use 404.shtml (currently I just pasted the contents of header and footer into the 404 page along with the message).

Just curious.

meikel
01-05-1999, 08:24 AM
See my replies in
http://www.aota.net/ubb/Forum2/HTML/000025.html

That should get you started. I'm not sure if you can use shtml, but I know you can use CGI, so shtml should not be a problem.

Just try. If it doesn't work....

Greetings from Bonn, Germany
[nbsp][nbsp]Meikel Weber
http://www.meikel.com

Justin
01-05-1999, 09:07 AM
I'm going to have to try it out, then. I have no clue how to do any of this - I don't have a telnet program, and I'm not all too concerned with it. For now, I'll just keep using the html page, and I'll just have to update its links separately.

Or I could use 404.html simply to redirect to 404.shtml - I guess I am going to too much trouble over dead links - my site is currently only 7 pages (not counting 404.html).

Anyway, I was just curious. I'm new to this, actually having a server (my site was on Geocities - augh!). It's just nice having possibilities!

------------------
Justin Nelson, SFE Inc.
http://www.vdj.net

meikel
01-05-1999, 09:14 AM
Hi,

there is no need for telnet to create an .htaccess file. You can create it with your windows Notepad.exe and upload it via FTP to the location you like, but you MUST turn on ASCII transfer.

Make it a one line ascii file and upload it (the one line is that ErrorDocument...)

That should work.

Meikel

Justin
01-07-1999, 11:07 AM
Thanks, everyone, for the responses! I now have a custom 404.shtml page with links that update with my other pages. I did find out the hard way that any graphics, links, etc., need the full path on an SSI include file, at least if you use the same include file in different directories!! I forgot that the HTML is parsed as though it were all in the same file, so it doesn't matter where the SSI file is located with respect to the images.

But it's all good now. Now I can show off my dead links proudly *s*

http://www.vdj.net/something_that_doesn't_exist

------------------
Justin Nelson, SFE Inc.
http://www.vdj.net

MrBlunt
01-07-1999, 05:28 PM
There is a great CGI script called "Guardian" from:

http://www.xav.com/scripts/guardian/index.html

It allows not only customized "404" pages but will catch other errors like "401", "403", CGI script errors and attempts to enter "secure" directories.

One nice feature is you can receive an email each time an error occurs. This can be a nightmare also so use with caution. I have disabled it on mine.

It is small and fairly easy to install. It would also be easy to redirect output to any kind of page, be it HTML SHTML CGI etc.

Deb
01-08-1999, 01:52 AM
I did find out the hard way that any graphics, links, etc., need the full path on an SSI include file, at least if you use the same include file in different directories!!

Where this is true I usually just start at the root... for example let's say your include files are in domain.com/include/ and you are using SSI in domain.com/blah/blah/blah/ and other various places...

I begin all my links in the include file with a / if images are in domain.com/images/buttons/small/
then I can simply use img src="/images/buttons/small/"
and it will work everywhere http://www.aota.net/ubb/smile.gif ergo you can skip the http://www.domain.com part

Hope this helps
Deb

Justin
01-12-1999, 12:40 PM
Well, I got bored and wrote a little program for personal use that makes a temporary html page out of an shtml page, along with any file includes. This way, I associate shtml files with it, and it opens the default browser with the temp page. It's quick, too.

It doesn't work with virtual yet, though, because any reference to the doc root goes to C:\.

This way, I can use notepad to edit, and I can instantly see what the page will look like when it's on the server, without having to upload it first or cut and paste a temp file myself.

I am working on an actual non wysiwyg editor with built in browsing capabilities that parses the SSI's, even virtual. You'll just have to specify what directory is your doc root on your HDD (e.g. C:\Site). It will require IE 4.0 to be installed, though, for the viewing part.

I will give this out as freeware when it's done, and I'll post the link then too.

I go through great lengths to ensure that I can be lazy http://www.aota.net/ubb/smile.gif

Justin

------------------
Justin Nelson, SFE Inc.
http://www.vdj.net

Justin
01-13-1999, 01:04 AM
Haha - I love DOS! I forgot about a little command called SUBST. Now, drive F: = C:\Site, and all of my virtual paths work, so now I can view my pages exactly as they are on the server, with ssi and my image paths. All doc roots point to the root of the drive, which is c:\site. Cool http://www.aota.net/ubb/smile.gif

Justin, trying to make a server out of his PC http://www.aota.net/ubb/smile.gif

------------------
Justin Nelson, SFE Inc.
http://www.vdj.net