Contao-Camp 2024
Ergebnis 1 bis 19 von 19

Thema: "Die Sprache zur URL hinzufügen" macht Probleme

  1. #1
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard "Die Sprache zur URL hinzufügen" macht Probleme

    Hallo zusammen,

    wenn ich in den Einstellungen den Option "Die Sprache zur URL hinzufügen" aktiviere kann ich anschließend die
    www.example.de/index.php nicht mehr aufrufen (Error 404), index.html wird auf den www.example.de/de/index.html
    ordentlich weitergeleitet. Das mit der 404 auf der index.php beeinträchtigt das Ranking bei Google enorm...
    In den Einstellungen sind auch "URLs umschreiben" aktiviert und "URL-Suffix auf .html geändert.

    Wie bekommt man es hin, dass auch die index.php aufgerufen werden kann?

    Viele Grüße
    Mirko

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

    Standard

    Zitat Zitat von gia-online Beitrag anzeigen
    Das mit der 404 auf der index.php beeinträchtigt das Ranking bei Google enorm...
    Warum? Diese URL sollte ja gar nicht im Index von Google sein. Ist sie das aus welchen Gründen auch immer dennoch, dann musst du einen 301 Redirect machen.

  3. #3
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    Hallo Spooky,

    du hast Recht.

    Sorry, das Problem stellt sich nun doch ganz anders dar... und zwar werde ich beim Aufruf der URL www.example.de
    auf die Seite www.example.de/de/index.html, also meine Startseite gebracht. Meine SEO-Tool "Redirect Path" gibt mir
    jedoch dann aber die Meldung "www.exaple.de/de/index.html" kann nicht geöffnet werden 404, obwohl ich die Seite sehe???

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

    Standard

    Dein SEO Tool kannst du wohl vergessen

  5. #5
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    Nein, nicht ganz... da die Index bei Google verschwunden ist!?

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

    Standard

    Was genau ist verschwunden? Poste reale URLs.

  7. #7
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

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

    Standard

    Zitat Zitat von gia-online Beitrag anzeigen
    Wenn die URL im Index von Google war, solltest du dafür natürlich einen Redirect anlegen.

  9. #9
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    Eigentlich bräuchte ich folgende beide Redirects:

    Redirect /index.html http://www.beruf-gaertner.de
    Redirect /index.php http://www.beruf-gaertner.de

    Damit anschließend der User auf seine Sprache /DE oder /En geführt wird.

    Erzeugt im Browser eine "Weiterleitungsfehler" und die index.php als auch die index.html erzeugen 404!?

    Ich stehe hier total auf dem Schlauch :-(
    Geändert von gia-online (16.03.2018 um 13:56 Uhr)

  10. #10
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    Hallo zusammen,

    ich versuche das Problem nochmal zu beschreiben, da ich hier selbst leider nicht weiter komme:
    Ich verwende "changelaguage" und URLs umschreiben und bekomme folgendes Fehlerbild für die Startseite:

    Aktivieren von "Die Sprache zur URL hinzufügen" und URLs "nicht" umschreiben, dann sehen die deutsche und englische Startseite im Pfad so aus:
    > www.domain.com/index.php/de/
    > www.domain.com/index.php/en/home.html

    Aktivieren von "URLs umschreiben" und nicht "Die Sprache zur URL hinzufügen", dann sehen die deutsche und englische Startseite im Pfad so aus:
    > www.domain.com/
    > www.domain.com/home.html

    Und wenn ich jetzt beides aktiviere, dann kommt für die Startseite (mit Seitenalias = index) der Fehler 404 und alle anderen Seiten funktionieren wie gewünscht:
    > www.domain.com/de/beispielseite-de.html
    > www.domain.com/en/beispielseite-en.html

    Kann mir jemand helfen? Ich bin am verzweifeln.

    Viele Grüße
    Mirko

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

    Standard

    Poste einen Link zur Seite und poste deine .htaccess.

  12. #12
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    www.beruf-gaertner.de

    Code:
    ##
    # Contao Open Source CMS
    #
    # Copyright (c) 2005-2016 Leo Feyer
    #
    # @license LGPL-3.0+
    ##
    
    ##
    # Prevent access to the Contao template files
    ##
    <FilesMatch "\.(tpl|html5|xhtml)$">
      <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
      </IfModule>
      <IfModule mod_authz_core.c>
        Require all denied
      </IfModule>
    </FilesMatch>
    
    ##
    # Allow access from all domains for webfonts
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_headers.c>
      <FilesMatch "\.(ttf|ttc|otf|eot|woff2?|font\.css)$">
        Header set Access-Control-Allow-Origin "*"
      </FilesMatch>
    </IfModule>
    
    ##
    # Disable ETags
    # @see http://developer.yahoo.com/performance/rules.html#etags
    ##
    FileETag None
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    
    ##
    # Set the proper MIME types
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_mime.c>
      AddType application/javascript              js jsonp
      AddType application/json                    json
      AddType audio/ogg                           oga ogg
      AddType audio/mp4                           m4a f4a f4b
      AddType video/ogg                           ogv
      AddType video/mp4                           mp4 m4v f4v f4p
      AddType video/webm                          webm
      AddType video/x-flv                         flv
      AddType image/svg+xml                       svg svgz
      AddEncoding gzip                            svgz
      AddType application/vnd.ms-fontobject       eot
      AddType application/x-font-ttf              ttf ttc
      AddType font/opentype                       otf
      AddType application/x-font-woff             woff woff2
      AddType image/x-icon                        ico
      AddType image/webp                          webp
      AddType text/cache-manifest                 appcache manifest
      AddType text/x-component                    htc
      AddType application/xml                     rss atom xml rdf
      AddType application/x-web-app-manifest+json webapp
      AddType text/x-vcard                        vcf
      AddType application/x-shockwave-flash       swf
    </IfModule>
    
    ##
    # Gzip compression
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_deflate.c>
      <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
        AddOutputFilterByType DEFLATE application/javascript
        AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
        AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
        AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
      </IfModule>
    </IfModule>
    
    ##
    # Expires headers (for better cache control)
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_expires.c>
      ExpiresActive on
    
      ##
      # Productional website
      ##
      ExpiresByType text/cache-manifest           "access plus 0 seconds"
      ExpiresByType text/html                     "access plus 0 seconds"
      ExpiresByType text/xml                      "access plus 0 seconds"
      ExpiresByType application/xml               "access plus 0 seconds"
      ExpiresByType application/json              "access plus 0 seconds"
      ExpiresByType application/rss+xml           "access plus 1 hour"
      ExpiresByType application/atom+xml          "access plus 1 hour"
      ExpiresByType image/gif                     "access plus 1 month"
      ExpiresByType image/png                     "access plus 1 month"
      ExpiresByType image/jpeg                    "access plus 1 month"
      ExpiresByType image/x-icon                  "access plus 1 month"
      ExpiresByType video/ogg                     "access plus 1 month"
      ExpiresByType audio/ogg                     "access plus 1 month"
      ExpiresByType video/mp4                     "access plus 1 month"
      ExpiresByType video/webm                    "access plus 1 month"
      ExpiresByType text/x-component              "access plus 1 month"
      ExpiresByType application/x-font-ttf        "access plus 1 month"
      ExpiresByType font/opentype                 "access plus 1 month"
      ExpiresByType application/x-font-woff       "access plus 1 month"
      ExpiresByType image/svg+xml                 "access plus 1 month"
      ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
      ExpiresByType text/css                      "access plus 1 year"
      ExpiresByType application/javascript        "access plus 1 year"
    
      ##
      # Disable caching during development
      # @see https://github.com/contao/core/issues/4364
      ##
      #ExpiresByType text/cache-manifest           "access"
      #ExpiresByType text/html                     "access"
      #ExpiresByType text/xml                      "access"
      #ExpiresByType application/xml               "access"
      #ExpiresByType application/json              "access"
      #ExpiresByType application/rss+xml           "access"
      #ExpiresByType application/atom+xml          "access"
      #ExpiresByType image/gif                     "access"
      #ExpiresByType image/png                     "access"
      #ExpiresByType image/jpeg                    "access"
      #ExpiresByType image/x-icon                  "access"
      #ExpiresByType video/ogg                     "access"
      #ExpiresByType audio/ogg                     "access"
      #ExpiresByType video/mp4                     "access"
      #ExpiresByType video/webm                    "access"
      #ExpiresByType text/x-component              "access"
      #ExpiresByType application/x-font-ttf        "access"
      #ExpiresByType font/opentype                 "access"
      #ExpiresByType application/x-font-woff       "access"
      #ExpiresByType image/svg+xml                 "access"
      #ExpiresByType application/vnd.ms-fontobject "access"
      #ExpiresByType text/css                      "access"
      #ExpiresByType application/javascript        "access"
    
    </IfModule>
    
    ##
    # Header adjustments
    ##
    <IfModule mod_headers.c>
    
      ##
      # Disable caching during development
      # @see https://github.com/contao/core/issues/4364
      ##
      #Header unset Cache-Control
      #Header append Cache-Control must-revalidate
    
      ##
      # Do not cache the cron.txt file
      # @see https://github.com/contao/core/issues/5105
      ##
      <FilesMatch "cron\.txt$">
        Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
      </FilesMatch>
    
      ##
      # Add a Vary Accept-Encoding header for the compressed resources. If you
      # modify the file types above, make sure to change them here accordingly.
      # @see http://developer.yahoo.com/performance/rules.html#gzip
      #
      # Note: If you are using a case-sensitive file system like HFS+ or ext4, you
      # have to change the <FilesMatch> directive as follows:
      #
      # <FilesMatch "\.(?i:js|css|xml|gz|svgz)$">
      #
      # For more information see: https://github.com/contao/core/issues/4364
      ##
      <FilesMatch "\.(js|css|xml|gz|svgz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    
      ##
      # Do not cache source map files
      # @see https://github.com/contao/core/issues/8532
      ##
      <FilesMatch "\.map$">
        Header set Expires "0"
        Header set Cache-Control "no-cache, no-store, must-revalidate, max-age=0, proxy-revalidate, no-transform"
      </FilesMatch>
    
    </IfModule>
    
    ##
    # Disable MultiViews if you are having issues with requests returning the wrong
    # page. Requires AllowOverride Options=All,MultiViews to be set here.
    # @see https://github.com/contao/core/issues/3521
    ##
    #Options -MultiViews
    
    ##
    # 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 /
    
     
      #First rewrite any request to the wrong domain to use the correct one (here www.)
      RewriteCond %{HTTP_HOST} !^www\.
      RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
      #Now, rewrite to HTTPS:
      RewriteCond %{HTTPS} off
      RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
    
      ##
      # 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|html|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>

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

    Standard

    Zitat Zitat von gia-online Beitrag anzeigen
    Auf der Seite scheint alles zu funktionieren.

  14. #14
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    Hi Spooky,

    eben nicht (siehe Screenshot)... irgendwas ist hier im Argen und ich finde den Fehler nicht.

    LinkResearchTools-Link-Redirect-Trace-20180319-111308-www_beruf-gaertner_de-.png

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

    Standard

    https://www.beruf-gaertner.de/de/ liefert tatsächlich einen 404 Status Code.

    Welche Contao Version?

    Führe Contao im abgesicherten Modus aus und überprüfe ob https://www.beruf-gaertner.de/de/ dann immer noch einen 404 Status Code sendet. Wenn nicht liegt es an einer Extension.

    Übrigens liefert auch https://www.beruf-gaertner.de/system...der_styles.css einen 403 Status Code.

  16. #16
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    Contao Version -> 3.3.5

    Abgesicherter Modus hat leider keine Änderungen bzgl. dem Problem gebracht, weiterhin 404 !?

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

    Standard

    Zitat Zitat von gia-online Beitrag anzeigen
    Contao Version -> 3.3.5
    Aktualisiere zuerst auf Contao 3.5.34.

  18. #18
    Contao-Nutzer
    Registriert seit
    23.02.2011.
    Beiträge
    117

    Standard

    Wenn ich "Die Sprache zur URL hinzufügen" deaktiviere wird die www.beruf-gaertner.de ohne 404 angezeigt aber die
    Folgeseiten werden dann nicht mehr angezeigt (Objekt nicht gefunden)...

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

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
  •