.htaccess Beispiel um zu verhindern, dass die Anmeldung/Authorisierung (.htaccess / .htpasswd Schutz) zweimal erscheint.
SetEnvIf %{SERVER_PORT} ^80$ NON_SSL RewriteEngine On RewriteCond %{SERVER_PORT} ^80$ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] AuthName "Restricted Access" AuthType Basic AuthUserFile .htpasswd Order Deny,Allow Deny from all Satisfy any Require valid-user Allow from env=NON_SSL