14 lines
258 B
Plaintext
14 lines
258 B
Plaintext
RewriteEngine On
|
|
RewriteBase /
|
|
|
|
## SSL
|
|
# Enforce SSL
|
|
RewriteCond %{SERVER_PORT} !^443$
|
|
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST}
|
|
|
|
## Basic Auth protection
|
|
AuthType Basic
|
|
AuthName "secured area"
|
|
AuthUserFile /path/to/.htpasswd
|
|
require valid-user
|