[htaccess] Eigene Fehlerseite bei Subdomain

B

ByeBye 242513

Hallo,
folgende Situation:

Meine Ordner-Struktur ist wie folgt aufgebaut:
www.domain.de -> /var/www/webXXX/httpdocs/homepage/access_denied.html
projekt.domain.de -> /var/www/webXXX/httpdocs/projekt/
projekt.domain.de -> Passwortgeschützt durch .htaccess

Die Fehlerseite "access_denied.html" soll angezeigt werden, wenn die Zugangsdaten falsch sind. Es gibt insgesamt zwei .htaccess Dateien. Eine im Verzeichnis /homepage/ und eine im Verzeichnis /projekt/

.htaccess /projekt/
Code:
ErrorDocument 400 /var/www/webXXX/httpdocs/homepage/access_denied.html
ErrorDocument 401 /var/www/webXXX/httpdocs/homepage/access_denied.html
ErrorDocument 500 /var/www/webXXX/httpdocs/homepage/access_denied.html

AuthName "Projekt"
AuthType Basic
AuthUserFile /var/www/webXXX/httpdocs/projekt/.htpasswd
require valid-user

.htaccess /homepage/
Code:
RewriteBase  /
RewriteEngine On

ErrorDocument 400 /error.html
ErrorDocument 401 /access_denied.html
ErrorDocument 403 /access_denied.html
ErrorDocument 404 /error.html
ErrorDocument 410 /error.html
ErrorDocument 500 /var/www/webXXX/httpdocs/homepage/access_denied.html

Leider zeigt mir die Webseite bei falschen Zugangsdaten unter projekt.domain.de nicht die eigene Fehlerseite an, sondern die Standardfehlerseite:
Unauthorized
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Warum?
 
Zurück