Dedicated 404 pages how do they do it?

Dedicated 404 pages how do they do it?

am 22.09.2007 13:13:46 von Desmond

Some major websites have their own dedicated page not found error. I
do not have control of the server that is used for my website. Can I
still have my own dedicated 404 page?

Desmond.

Re: Dedicated 404 pages how do they do it?

am 22.09.2007 13:53:20 von Jensen Somers

Hello,

On Sat, 22 Sep 2007 04:13:46 -0700, Desmond wrote:

> Some major websites have their own dedicated page not found error. I do
> not have control of the server that is used for my website. Can I still
> have my own dedicated 404 page?
>
> Desmond.

You will have to create a .htaccess file, put it in the websites root
folder and use the following line:

ErrorDocument 404 http://www.mywebsite.tld/404.php

- Jensen

Re: Dedicated 404 pages how do they do it?

am 22.09.2007 13:53:24 von j80k-vpfc

In article <1190459626.745120.24630@g4g2000hsf.googlegroups.com>,
otuatail@aol.com (Desmond) wrote:

> *Subject:* Dedicated 404 pages how do they do it?
> *From:* Desmond
> *Date:* Sat, 22 Sep 2007 04:13:46 -0700
>
> Some major websites have their own dedicated page not found error. I
> do not have control of the server that is used for my website. Can I
> still have my own dedicated 404 page?
>
> Desmond.
>
>
A question probably best put to your hosting provider. Certainly it is a
function of the Webserver.


- Steve

Re: Dedicated 404 pages how do they do it?

am 22.09.2007 14:07:37 von Bucky Kaufman

"Desmond" wrote in message
news:1190459626.745120.24630@g4g2000hsf.googlegroups.com...

> Some major websites have their own dedicated page not found error. I
> do not have control of the server that is used for my website. Can I
> still have my own dedicated 404 page?

You gotta ask your hosting provider.
Most of the ones I've used allow it through a setting in the IPP's user
control panel.

Re: Dedicated 404 pages how do they do it?

am 22.09.2007 15:08:23 von Lars Eighner

In our last episode, <1190459626.745120.24630@g4g2000hsf.googlegroups.com>,
the lovely and talented Desmond broadcast on comp.lang.php:

> Some major websites have their own dedicated page not found error. I
> do not have control of the server that is used for my website. Can I
> still have my own dedicated 404 page?

A line like

ErrorDocument 404 /opps.html

can do this in an .htaccess file in your web directory.

However, your site has to run on a server that uses .htaccess files and this
feature has to be enabled on it. Details may vary, so research the
docuentation for the server your host runs. Many hosts that you pay for
already have this feature enabled, so you can give a try. If it is enabled,
the host evidently intends for you to use it, but may not be willing to hold
your hand or set up the page for you. However, "free" hosts often like to
use 404 and other error documents to promote themselves or other sites that
pay for hits.

--
Lars Eighner
Countdown: 486 days to go.
What do you do when you're debranded?

Re: Dedicated 404 pages how do they do it?

am 22.09.2007 15:36:16 von Bucky Kaufman

"Jensen Somers" wrote in message
news:uLWdncwJbvmtn2jbnZ2dneKdnZydnZ2d@giganews.com...

> You will have to create a .htaccess file, put it in the websites root
> folder and use the following line:
>
> ErrorDocument 404 http://www.mywebsite.tld/404.php

Oh, cool!
I just happened to have my .htaccess file open in my editor when I saw your
post.
(I was messing with the rewrite engine stuff.)
I tried that and it worked.

Very cool.

Re: Dedicated 404 pages how do they do it?

am 23.09.2007 22:16:01 von Michael Fesser

..oO(Jensen Somers)

>You will have to create a .htaccess file, put it in the websites root
>folder and use the following line:
>
>ErrorDocument 404 http://www.mywebsite.tld/404.php

_Don't_ use an absolute URL in an ErrorDocument directive unless you
know exactly what you're doing. This will lead to a redirect and an
additional request of the given document, which usually results in the
status code 200 ("OK") sent back to the client instead of the correct
error code.

http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

Micha

OT: Re: Dedicated 404 pages how do they do it?

am 24.09.2007 11:52:06 von Bucky Kaufman

"Michael Fesser" wrote in message
news:uvhdf31uqqv668fsul7gt4ar7qmoi2mr15@4ax.com...
> .oO(Jensen Somers)
>
>>You will have to create a .htaccess file, put it in the websites root
>>folder and use the following line:
>>
>>ErrorDocument 404 http://www.mywebsite.tld/404.php
>
> _Don't_ use an absolute URL in an ErrorDocument directive unless you
> know exactly what you're doing. This will lead to a redirect and an
> additional request of the given document, which usually results in the
> status code 200 ("OK") sent back to the client instead of the correct
> error code.
>
> http://httpd.apache.org/docs/2.2/mod/core.html#errordocument

Thank you very much for that!
I'll fix mine right away.
There's also a WHOLE LOTTA extra HTAccess stuff in that link I'll be
studyin' on.