Add rules to .htaccess for serving static files and enforcing HTTPS

This commit is contained in:
Fabian Schieder 2026-02-28 01:40:13 +01:00
parent c1b3173119
commit 0b7463c885

View File

@ -4,7 +4,13 @@ Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# Statische Dateien & Ordner direkt servieren
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# HTTPS erzwingen
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>