Ergebnis 1 bis 3 von 3

Thema: Login-Probleme nach URL-Umschreibung ohne Suffix

  1. #1
    Contao-Nutzer
    Registriert seit
    05.08.2012.
    Beiträge
    19

    Standard Login-Probleme nach URL-Umschreibung ohne Suffix

    Hallo Zusammen,

    ich habe im Forum nichts gefunden, wie ich mein Problem beheben kann. (oder ich weiß nicht genau wonach ich suchen soll?)

    Ich habe eine Contao Installation 3.4 und URL-Umschreiben aktiviert, dementsprechend auch die .htaccess angepasst. Das hat auch alles ohne Probleme funktioniert.
    Jetzt wollt ich noch den Suffix .html weglassen, habe den Suffix in den Einstellungen gelöscht, die .htaccess angepasst, das klappt auch ich kann die Seiten ohne .html aufrufen ALLERDINGS KOMME ICH JETZT NICHT MEHR INS BACKEND!!!

    Ich habe keine Ahnung was ich wie wo umstellen muss, damit alles klappt!

    Hier die Einstellungen von Conto und der der .htaccess:
    contao-einstellungen.jpg

    HTML-Code:
    ##
    # URL rewriting
    ##
    <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} ^firmenname\.de$ [NC]
      #   RewriteRule (.*) http://www.firmenname.de/$1 [R=301,L]
      #
      # Uncomment the following lines to remove "www." from the domain:
      #
     RewriteCond %{HTTP_HOST} ^www\.firmenname\.de$ [NC]
     RewriteRule (.*) http://firmenname.de/$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|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
      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]
    Geändert von ajdan77 (27.08.2015 um 09:54 Uhr)

  2. #2
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    34.316
    Partner-ID
    10107

    Standard

    1. Schreib' den .htaccess code bitte in [code] Tags.

    2. Lies' dir die Kommentare in der .htaccess nochmal genau durch, dann würdest du erfahren was du falsch gemacht hast:
    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).
      #
      #   RewriteCond %{REQUEST_FILENAME} !-d
      #   RewriteRule .* index.php [L]
      #
    Der gesamte betroffene Teil muss also folgendermaßen lauten:
    Code:
      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]
    Das ist bei dir derzeit nicht der Fall, daher kommst du auch nicht mehr ins Backend.

  3. #3
    Contao-Nutzer
    Registriert seit
    05.08.2012.
    Beiträge
    19

    Standard

    Danke!

    Es lag nur an dem einen Eintrag den ich vergessen hatte... manchmal sieht man den Wald vor lauter Bäumen nicht!!!

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •