Added rule to allow .php-ending

This commit is contained in:
Philip 2021-08-22 03:13:38 +02:00
parent 0da26db431
commit b756ee2149

View file

@ -15,14 +15,8 @@ RewriteRule datenschutz privacy-policy [L,R=301]
# UTF-8 Endcoding
AddDefaultCharset UTF-8
# Remove .php/.html-filename
RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^ %{REQUEST_URI}.html [NC,L]
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
ErrorDocument 404 /404.html