Options -Indexes
RewriteEngine On

# Force HTTPS and WWW.
RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP_HOST} !^www\.milano-pizza-schwenningen\.de$ [NC]
RewriteRule ^ https://www.milano-pizza-schwenningen.de%{REQUEST_URI} [R=301,L,NE]

# Redirect index files to the homepage.
RewriteCond %{THE_REQUEST} \s/+index\.(?:html?|php)[\s?] [NC]
RewriteRule ^index\.(?:html?|php)$ https://www.milano-pizza-schwenningen.de/ [R=301,L,NE]

# Normalize /menu/ to the requested URL without trailing slash.
RewriteRule ^menu/$ https://www.milano-pizza-schwenningen.de/menu [R=301,L,NE]

# Keep existing files and directories accessible.
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
