Apache Server configuration support - How to use ErrorDocument on Windows' Apache?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > February 2006 > How to use ErrorDocument on Windows' Apache?





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 How to use ErrorDocument on Windows' Apache?
howachen@gmail.com

2006-01-30, 8:44 am

Hi,

I am using apache2, on windows.

I have an alias - www, which point to d:\www

(while the DocumentRoot is at d:\apache2\www)

I have a .htaccess on d:\www, which contains:

-----------------------------------------
ErrorDocument 401 d:/www/error.php
ErrorDocument 403 d:/www/error.php
ErrorDocument 404 d:/www/error.php
ErrorDocument 500 d:/www/error.php
-----------------------------------------


but apache's error log said :

cannot use a full URL in a 401 ErrorDocument directive --- ignoring!

and i never make this custom error page work on windows. what should i
set for the path? (for linux, it is easy as we just need to give the
real path, but for windows, what should i set?)




thanks for any comments.

Robert Ionescu

2006-01-30, 5:59 pm

howachen@gmail.com wrote:
> I have an alias - www, which point to d:\www
>
> (while the DocumentRoot is at d:\apache2\www)
>
> I have a .htaccess on d:\www, which contains:
>
> -----------------------------------------
> ErrorDocument 401 d:/www/error.php
> ErrorDocument 403 d:/www/error.php
> ErrorDocument 404 d:/www/error.php
> ErrorDocument 500 d:/www/error.php
> -----------------------------------------
>
>
> but apache's error log said :
>
> cannot use a full URL in a 401 ErrorDocument directive --- ignoring!


You cannot use a physical path here, use a local URL (or does this not
work?)

ErrorDocument 401 /www/error.php
ErrorDocument 403 /www/error.php

etc.

--
Robert

howa

2006-01-31, 2:49 am

Hi,

Thanks for your reply.

You suggestion works!

One more question:

If you have the error document at another drive (say, c drive), so what
should i set?

Thanks again.


Robert Ionescu =E5=AF=AB=E9=81=93=EF=BC=9A

> howachen@gmail.com wrote:
>
> You cannot use a physical path here, use a local URL (or does this not
> work?)
>
> ErrorDocument 401 /www/error.php
> ErrorDocument 403 /www/error.php
>=20
> etc.
>=20
> --=20
> Robert


Robert Ionescu

2006-02-01, 6:08 pm

howa wrote:
> If you have the error document at another drive (say, c drive), so what
> should i set?


Setup an alias in httpd.conf like
Alias /errdocs "c:/path/to/some/folder"

and use
ErrorDocument 404 /errdocs/403.php

--
Robert
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com