httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthijs Rohs" <matth...@rohs.nl>
Subject RE: Personalized ErrorDocument for mod_vhosts
Date Wed, 14 Aug 2002 20:26:03 GMT
I use this in .htaccess:

 

ErrorDocument 401 /error/401.php

ErrorDocument 403 /error/403.php

ErrorDocument 404 /error/404.php

ErrorDocument 500 /error/500.php

 

And it works :-) just turn put AllowOverride to All

 

ViVa

 

-----Oorspronkelijk bericht-----
Van: Mauricio Bracale [mailto:mbracale@cidadei.com.br] 
Verzonden: woensdag 14 augustus 2002 22:22
Aan: 'users@httpd.apache.org'
Onderwerp: RES: Personalized ErrorDocument for mod_vhosts

 

 

    Ok, that solve the ErrorDocument runing into .htaccess problem, but
I´m still having a trouble to make this redirect internal. When I do: 

            ErrorDocument 404 http://domain.com/404.html 

            It works, bu to do this (once I have mod-rewrite) the
software is going to request again the URL, passing through all rewrite
conditions and depreciating the server speed. When I use:

            ErrorDocument 404 /404.html , or any variant (absolute path,
relative path)

            The server gives me the standard 404 error, in error log,
shows notting, and in access log just show me that this page return me a
404 error code:

 

Error_log

 File does not exist: /home/vhosts/domain/htdocs/dgsgege.html

 

Access_log

 "GET /dgsgege.html HTTP/1.1" 404 123

 

    Is this anything that I did wrong?

 

    Thanks.

 

 -----Mensagem original-----
De: Matthijs Rohs [mailto:matthijs@rohs.nl]
Enviada em: quarta-feira, 14 de agosto de 2002 16:47
Para: users@httpd.apache.org
Assunto: RE: Personalized ErrorDocument for mod_vhosts

Maybe AllowOverride is turned to None, put them to All and try again...
(in your httpd.conf i'm talking about now...)

Then .htaccess will be recognized.

 

ViVa

 

-----Oorspronkelijk bericht-----
Van: Mauricio Bracale [mailto:mbracale@cidadei.com.br] 
Verzonden: woensdag 14 augustus 2002 21:30
Aan: 'users@httpd.apache.org'
Onderwerp: RES: Personalized ErrorDocument for mod_vhosts

 

    I´ve tried already. First I´ve tried .htaccess with "Alias", end put
ErrorDocument to search into /errorpages: 

                Alias /errorpages /home/vhosts/domain/htdocs

                But did´t work, the error log said:
"/home/vhosts/domain/htdocs/.htaccess: Alias not allowed here"

    Then I´ve tried with ErrorDocument inside .htaccess:

                ErrorDocument 404    404.html  and tried also

                ErrorDocument 404    ./404.html  and

                ErrorDocument 404    /home/vhosts/domain/htdocs/404.html

                But did´t work too, the error log said:
"/home/vhosts/domain/htdocs/.htaccess: ErrorDocument not allowed here"

    

    I was trying to use mod_rewrite, and created a rule, but this rule
enter in loop:

                RewriteCond %{HTTP_HOST}  ([a-z0-9]+)\.domain\.com\.br
                RewriteCond %{REQUEST_URI} !-f
                RewriteRule ^/(.*)$ http://%0/404.html
<http://%250/404.html>  [R]

    

                Tried also

 

                RewriteCond %{HTTP_HOST}  ([a-z0-9]+)\.domain\.com\.br
                RewriteCond %{REQUEST_URI} !-U
                RewriteRule ^/(.*)$ http://%0/404.html
<http://%250/404.html>  [R]

 

                But in this case, the rule don´t redirect to the error
page.

 

                Any other ideas??

 

 

 -----Mensagem original-----
De: Matthijs Rohs [mailto:matthijs@rohs.nl]
Enviada em: terça-feira, 13 de agosto de 2002 19:16
Para: users@httpd.apache.org
Assunto: RE: Personalized ErrorDocument for mod_vhosts

Use a .htaccess in each sitemap containing:

 

ErrorDocument 404 "Client Error 404: Not Found

 

Or this:

 

ErrorDocument 404 /error/404.php

 

Matthijs

 

-----Oorspronkelijk bericht-----
Van: Mauricio Bracale [mailto:mbracale@cidadei.com.br] 
Verzonden: dinsdag 13 augustus 2002 21:20
Aan: users@httpd.apache.org
Onderwerp: Personalized ErrorDocument for mod_vhosts

 

 

    Hi, 

    I have a apache 1.3.26 running with mod_vhosts, and a lot of virtual
sites. Now they want a personalized 404 Error Page for each site, but I
did´t now how to do it using mod_vhosts.    

    Can anybody help me?

 

    Thanks

 

[]´s 

________________________________________________

Mauricio Bracale

Cidade Internet - Grupo CLARIN

mbracale@cidadei.com.br

Tel: 3365-4117

Analista de Suporte

 


Mime
View raw message