Zitat von
Grossvater
Wie sieht meine htaccess aus?
Ihr seht das meine htaccess etwas angepasst ist, da es anderweitig nicht möglich war das URL Rewrite ohne Suffix anzuschalten. Vielleicht hängt es damit mit der doppelten Zeile ( RewriteCond %{REQUEST_FILENAME} !-f) zusammen? Wenn ich diese ausschalte funktioniert das Rewrite nicht mehr.
Puh, keine Ahnung was dieses Mischmasch in deiner .htaccess aus den Requests macht, aber so wie unten sollte sie meiner Meinung nach aussehen. Du hattest oben zwischen den Kommentaren eine Umschreibung drin für "ohne Suffix" und unten dann noch mal eine für ".html".
Code:
##
# By default, Contao adds ".html" to the generated URLs to simulate static
# HTML documents. If you change the URL suffix in the back end settings, make
# sure to change it here accordingly!
#
# RewriteRule .*\.html$ index.php [L] # URL suffix .html
# RewriteRule .*\.txt$ index.php [L] # URL suffix .txt
# RewriteRule .*\.json$ index.php [L] # URL suffix .json
#
# If you do not want to use an URL suffix at all, you have to add a third
# line to prevent URLs that point to folders from being rewritten (see #4031).
#
#
# If you are using mod_cache, it is recommended to use the RewriteRule below,
# which adds the query string to the internal URL:
#
# RewriteRule (.*\.html)$ index.php/$1 [L]
#
# Note that not all environments support mod_rewrite and mod_cache.
##
RewriteCond %{REQUEST_FILENAME} !\.(htm|php|js|css|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|mp4|webm|ogv|mp3|ogg|oga|eot|otf|tt[cf]|woff2?|svgz?|pdf|gz)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]
##
# The following rules are required if you want to pass the language as first
# URL parameter (added in Contao 2.11). The first rule rewrites the empty URL
# to the front end controller, the second one adds a missing trailing slash.
##
RewriteRule ^[a-z]{2}(\-[A-Z]{2})?/$ index.php [L]
RewriteRule ^([a-z]{2}(\-[A-Z]{2})?)$ $1/ [R=301,L]
ErrorDocument 403 /index.php
ErrorDocument 404 /index.php
Lesezeichen