|
Home > Archive > Web Servers on Unix and Linux > October 2006 > About custom HTTP 404 error pages.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
About custom HTTP 404 error pages.
|
|
| mistral 2006-10-22, 1:14 pm |
| Just want create custom HTTP 404 error page, to redirect the visitors
to custom 404 error page, every time they catch into an HTTP 404 error.
I need add line in htaccess file:
ErrorDocument 404 /errors/notfound.html
Where need be placed this htaccess file?
The hosting i use is virtual shared hosting, so I can control only my
virtual space, not the Apache configuration files. The server's
existing configuration at errors redirects visitors on an arbitrary
advertising page. The same question for errors of user's authorization
in Apache basic authentification form. It's redirected at errors on the
same advertising page, even not in Apache default form('Authorization
reguired').
thanks.
| |
|
|
mistral wrote:
> Just want create custom HTTP 404 error page, to redirect the visitors
> to custom 404 error page, every time they catch into an HTTP 404 error.
> I need add line in htaccess file:
>
> ErrorDocument 404 /errors/notfound.html
>
> Where need be placed this htaccess file?
> The hosting i use is virtual shared hosting, so I can control only my
> virtual space, not the Apache configuration files. The server's
> existing configuration at errors redirects visitors on an arbitrary
> advertising page. The same question for errors of user's authorization
> in Apache basic authentification form. It's redirected at errors on the
> same advertising page, even not in Apache default form('Authorization
> reguired').
>
> thanks.
The .htaccess file should be placed in your particular "document root".
| |
| mistral 2006-10-23, 7:18 pm |
|
"Mike =D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0):
"
> mistral wrote:
> Just want create custom HTTP 404 error page, to redirect the visitors
> to custom 404 error page, every time they catch into an HTTP 404 error.
> I need add line in htaccess file:
> ErrorDocument 404 /errors/notfound.html
> Where need be placed this htaccess file?
> The hosting i use is virtual shared hosting, so I can control only my
> virtual space, not the Apache configuration files. The server's
> existing configuration at errors redirects visitors on an arbitrary
> advertising page. The same question for errors of user's authorization
> in Apache basic authentification form. It's redirected at errors on the
> same advertising page, even not in Apache default form('Authorization
> reguired').
> thanks.
> The .htaccess file should be placed in your particular "document root".
-----------------------------
what can be considered by particular "document root"? When ftp
connected to server, a directory structure looks following (as shown in
'Remote Site' ftp window):
/
/www/
/www/folders/...
'/' - here I can upload files or create folders, but its not
accessible from web.
/www/ - from here files are visible and where actual web pages goes
Ftp client first show '/' level, is this particular "document root"? If
run phpinfo script(from /www/), it show in 'Apache environment':
DOCUMENT_ROOT: /var/www/ and
SCRIPT_FILENAME: /home/vol1/domain.com/s/subdomain/www/phpinfo.php
Usually document root used for htpasswd storage also. But what is
absolute patch to this 'document root' dir?
|
|
|
|
|