uberspace-webadmin/.htaccess.sample

30 lines
528 B
Plaintext
Raw Permalink Normal View History

RewriteEngine On
RewriteBase /
2015-07-10 20:39:21 +02:00
# SSL Enforement
2015-07-10 08:28:49 +02:00
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST}
2015-07-10 20:39:21 +02:00
# Basic Auth protection
2015-07-08 23:06:31 +02:00
AuthType Basic
AuthName "secured area"
AuthUserFile /path/to/.htpasswd
require valid-user
2015-07-10 20:39:21 +02:00
# Protect every file excluding CSS, JS, PHP and HTML
<Files *>
Order Deny,Allow
Deny from all
</Files>
<FilesMatch ^$>
Order Allow,Deny
Allow from all
</FilesMatch>
<FilesMatch "\.(css|js|php|html|htm|var|png)$">
2015-07-10 20:39:21 +02:00
Order Allow,Deny
Allow from all
</FilesMatch>