Weydiiso lambarka sirta ah SSL

Xiddigta soo socota had iyo jeer waxay leedahay saameyn aan fiicnayn: Haddii aad ku ilaaliso goobtaada htaccess / htpasswd isla markaana isla markaa ku qasbo xiriir SSL, waxaad had iyo jeer u baahan tahay inaad gasho isla erey isku mid ah laba jeer (hal mar oo loogu talagalay http iyo mar labaad ka dib markaad ku guuleysato gelitaanka https). Iyada oo gacan laga helayo qaybaha qaabeynta ee lagu soo bandhigay Apache 2.4, dhibaatada si fudud ayaa wax looga qaban karaa.


# SSL erzwingen
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Authentifizierung (nur bei verschlüsselten Verbindungen)
<If "%{HTTPS} == 'on'">
AuthUserFile /path/to/.htpasswd
AuthName "Interner Bereich"
AuthType Basic
require valid-user
</If>
Dib u laabo