Hallo,
habe bereits das ganze Forum samt Google durchsucht, aber keine Lösung für mein Problem gefunden und bin auch kein Server-Admin bzw. habe ich wenig Ahnung von Serverkonfigurationen.
Mein Problem ist, dass ich die index.php nicht aus der URL entfernt bekomme, ohne dass die Seite nicht gefunden wird.
Da die Website bei einem kleinen Provider liegt, habe ich die Befürchtung, dass in den Server-Einstellungen trotz des geladenen Moduls "mod_rewrite" etwas nicht stimmt. Hier mal die groben Eckdaten:
Contao Version: 3.5.33
PHP-Version: PHP Version 7.0.22-0
Apache:
Code:
Loaded Modules: core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version
mod_unixd mod_access_compat mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core
mod_authz_host mod_authz_user mod_autoindex mod_deflate mod_dir mod_env mod_filter mod_mime prefork
mod_negotiation mod_php7 mod_rewrite mod_setenvif mod_status
Die Pathconfig sagt:
Code:
// Relative path to the installation
return '';
die htaccess-Datei mit dem Rewrite:
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
##
# Change the RewriteBase if your Contao installation is in a subdirectoy and
# the rewrite rules are not working properly. Usage examples:
#
# RewriteBase /contao-3.0.0
# RewriteBase /path/to/contao
#
# Depending on your server, you might have to remove the line entirely.
##
RewriteBase /
##
# Uncomment the following lines to add "www." to the domain:
#
#RewriteCond %{HTTP_HOST} ^ius-gmbh\.de$ [NC]
#RewriteRule (.*) http://www.ius-gmbh.de/$1 [R=301,L]
#
# Uncomment the following lines to remove "www." from the domain:
#
# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
# RewriteRule (.*) http://example.com/$1 [R=301,L]
#
# Make sure to replace "example.com" with your domain name.
##
##
# If you cannot use mod_deflate, uncomment the following lines to load a
# compressed .gz version of the aggregated Contao JavaScript and CSS files.
##
#AddEncoding gzip .gz
#<FilesMatch "\.js\.gz$">
# AddType "application/javascript" .gz
#</FilesMatch>
#<FilesMatch "\.css\.gz$">
# AddType "text/css" .gz
#</FilesMatch>
#RewriteCond %{HTTP:Accept-encoding} gzip
#RewriteCond %{REQUEST_FILENAME} \.(js|css)$
#RewriteCond %{REQUEST_FILENAME}.gz -f
#RewriteRule ^(.*)$ $1.gz [QSA,L]
##
# 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).
#
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule .* index.php [L]
#
# 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|map|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|mp4|webm|ogv|mp3|ogg|oga|eot|otf|tt[cf]|woff2?|svgz?|pdf|zip|gz)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .*\.html$ 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]
</IfModule>
Wenn ich in den BE- Einstellungen nun das Häkchen bei "URLs umschreiben" setze, bekomme ich bei den Unterseiten:
"The requested URL /xy.html was not found on this server."
Die Startseite macht keine Probleme.
Jemand eine Idee?
Lesezeichen