URLs umschreiben, Ordnerstrukturen und URL-Suffix .php
Hallo,
bin mit meinem Projekt auf Contao umgestiegen und habe die Ordnerstrukturen und das Umschreiben der URLs aktiviert . Soweit so gut, allerdings hatte ich in meinem alten Projekt Seiten mit .php-Endung und wenn ich in Contao als URL-Suffix .php einstelle, kann ich zwar alle Seiten des Projekts aufrufen, die Login-Seite für das Contao-Backend aber nicht mehr. Die .htaccess habe ich mit
RewriteRule .*\.php$ index.php [L]
entsprechend angepasst.
Frage: Gibt es in meinem Fall eine andere Möglichkeit auf das Backend zuzugreifen oder muss ich die .htaccess noch weiter anpassen?
Grüße
Liste der Anhänge anzeigen (Anzahl: 1)
Zitat:
Zitat von
Spooky
Vielleicht ist es besser, dass du dir da Redirects mit RewriteRules schreibst.
Werde ich machen, wenn es nicht anders geht. Bei 750 Seiten (mein Projekt) kann das schon mal ein bisschen dauern :-).
Hier ein Ausschnitt (die ganze htaccess befindet sich im Anhang):
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
RewriteRule .*\.php$ index.php [L] # URL suffix .php
#
# 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]