Add rules to .htaccess for serving static files and enforcing HTTPS
This commit is contained in:
parent
c1b3173119
commit
0b7463c885
@ -4,7 +4,13 @@ Options -Indexes
|
|||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
|
|
||||||
|
# Statische Dateien & Ordner direkt servieren
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -f [OR]
|
||||||
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
|
RewriteRule ^ - [L]
|
||||||
|
|
||||||
|
# HTTPS erzwingen
|
||||||
RewriteCond %{HTTPS} off
|
RewriteCond %{HTTPS} off
|
||||||
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user