Ergebnis 1 bis 17 von 17

Thema: Contao 3.2 SSL

  1. #1
    Contao-Fan Avatar von varix
    Registriert seit
    26.03.2010.
    Ort
    Berlin
    Beiträge
    626

    Standard Contao 3.2 SSL

    Guten Morgen,

    ich habe gestern problemlos ein Update auf 3.2 durchgeführt und musste leider die Erweiterung redirect deaktivieren, mit der ich einige Seiten (Kontakformular, wichtige Daten, etc.) auf https umleiten konnte. Alle anderen Seiten
    wurden bisher mit http dargestellt. Ich habe ein eigenes SSL-Zertifikat. Nun hab mir schon einiges angeschaut und gegoogelt ,aber keine passende Lösung gefunden. Eine Lösung wäre wohl alle Seiten über https laufen zu lassen.

    Gibt es eine Erweiterung, die unter Contao 3.2 läuft? Oder gibt es eine andere Lösung, nur bestimmte Seiten über https laufen lassen zu können, wobei beim Wechsel zu einer anderen Seite auch der Wechsel zu http veranlasst, via htaccess?
    Ziel wäre eine Lösung, die bei bestimmten Seiten in der htaccess genannt wird (https) und alle anderen Seiten automatisch auf http umleitet.

    Freue mich über jede Idee.

    Grüße,
    varix

  2. #2
    Administrator Avatar von Nina
    Registriert seit
    04.06.2009.
    Ort
    Hamburg
    Beiträge
    4.755
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Hast du schon den Entwickler der Erweiterung angesprochen, wann ein Update auf 3.2 für die Extension geplant ist bzw. ob du ihn irgendwie dabei unterstützen kannst?

  3. #3
    Alter Contao-Hase Avatar von Supermann
    Registriert seit
    17.02.2010.
    Ort
    Löhne
    Beiträge
    1.293

    Standard

    Hallo,

    ich bin zwar kein Profi aber ich habe in meiner htaccess eine Umleitung auf ohne SSL bei einigen Seiten. Da ich alles auf ssl habe und nur einige Seiten wegen dem Upload ohne ssl nutzen muss.

    Du müsstest das ganze nur umschreiben, dann sollte das auch anders herrum funktionieren.

    HTML-Code:
    RewriteCond %{HTTPS} !=on
      RewriteCond %{REQUEST_URI} !^/bilder-hochladen
      RewriteCond %{REQUEST_URI} !^/photolab-images
      RewriteCond %{REQUEST_URI} !^/bilder-verwaltung
      RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
      #RewriteCond %{HTTPS} !=off
      #RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

  4. #4
    Contao-Fan Avatar von varix
    Registriert seit
    26.03.2010.
    Ort
    Berlin
    Beiträge
    626

    Standard

    Hallo Supermann,

    danke für deine Antwort. Das führ zu der Fehlermitteilung: Die aufgerufene Website leitet die Anfrage so um, dass sie nie beendet werden kann.

    Sollte ggf. noch erwähnen, dass die Seite unter einer subdomain läuft: neu.domain.de

    varix
    Geändert von varix (22.11.2013 um 10:30 Uhr)

  5. #5
    Contao-Fan Avatar von varix
    Registriert seit
    26.03.2010.
    Ort
    Berlin
    Beiträge
    626

    Standard

    Hallo Supermann,

    ich sehe im Augenblick den wald vor Bäumen nicht.

    Kannst du mir das kurz umschreiben, sodass alles auf http ist und nur die Ausnahmen, bsp. /kontakt auf https ist?

    Wäre super, danke!

    varix

  6. #6
    Alter Contao-Hase Avatar von Supermann
    Registriert seit
    17.02.2010.
    Ort
    Löhne
    Beiträge
    1.293

    Standard

    Hallo,

    werde ich mir ansehen. Muß nur erst einmal meine Zerschossene 3.2er wieder zum laufen kriegen.

  7. #7
    Alter Contao-Hase Avatar von Supermann
    Registriert seit
    17.02.2010.
    Ort
    Löhne
    Beiträge
    1.293

    Standard

    Hallo,

    ich denke das ich dir das morgen sagen kann.

  8. #8
    Contao-Fan Avatar von fabil
    Registriert seit
    10.11.2010.
    Beiträge
    383

    Standard

    Zitat Zitat von varix Beitrag anzeigen
    Hallo Supermann,

    ich sehe im Augenblick den wald vor Bäumen nicht.

    Kannst du mir das kurz umschreiben, sodass alles auf http ist und nur die Ausnahmen, bsp. /kontakt auf https ist?

    Wäre super, danke!

    varix
    Hallo varix, hier ein paar Beispiele von mir:

    Code:
    #Es soll nur folgender Link per HTTPS erreichbar sein:
    # /login.html
    
    RewriteCond %{SERVER_PORT} !=443
    RewriteCond %{REQUEST_URI} ^\/login\.html
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
    RewriteCond %{SERVER_PORT} ^443
    RewriteCond %{REQUEST_URI} !^\/login\.html [NC]
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    oder:

    Code:
    #Es sollen nur folgende Links per HTTPS erreichbar sein:
    # /login.html und /warenkorb.html
    
    RewriteCond %{SERVER_PORT} !=443
    RewriteCond %{REQUEST_URI} ^\/login\.html [OR]
    RewriteCond %{REQUEST_URI} ^\/warenkorb\.html
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
    RewriteCond %{SERVER_PORT} ^443
    RewriteCond %{REQUEST_URI} !^\/login\.html [NC]
    RewriteCond %{REQUEST_URI} !^\/warenkorb\.html [NC]
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    oder:

    Code:
    #Es sollen nur folgende Links per HTTPS erreichbar sein:
    # /login.html und /warenkorb.html und /kontakt/formular.html
    
    RewriteCond %{SERVER_PORT} !=443
    RewriteCond %{REQUEST_URI} ^\/login\.html [OR]
    RewriteCond %{REQUEST_URI} ^\/warenkorb\.html [OR]
    RewriteCond %{REQUEST_URI} ^\/kontakt\/formular\.html
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
    RewriteCond %{SERVER_PORT} ^443
    RewriteCond %{REQUEST_URI} !^\/login\.html [NC]
    RewriteCond %{REQUEST_URI} !^\/warenkorb\.html [NC]
    RewriteCond %{REQUEST_URI} !^\/kontakt\/formular\.html [NC]
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    Ich hoffe, ich konnte dir so helfen
    Die Anweisungen würde ich vor den Contao-Anweisungen in der .htaccess einfügen, spätestens jedoch vor den mod_rewrite-Anweisungen.:-)

    Viele Grüße
    Fabi
    Geändert von fabil (23.11.2013 um 11:02 Uhr)
    Github-Account: https://github.com/fabil

  9. #9
    Contao-Fan Avatar von varix
    Registriert seit
    26.03.2010.
    Ort
    Berlin
    Beiträge
    626

    Standard

    Hi fabil,

    vielen Dank, das hat perfekt gepasst.

    Schönes WE!

    varix

  10. #10
    Contao-Nutzer Avatar von Timon
    Registriert seit
    18.12.2010.
    Ort
    Fellbach bei Stuttgart
    Beiträge
    54

    Standard Weiterleitungsproblem nach Update auf Contao 3.2.12

    Hallo,
    ich stehe gerade ebenfalls vor einem SSL Weiterleitungsproblem mit der .htaccess.
    Ich nutze das ebenso wie in den Beispielen von Fabi - so dass nur bestimmt Seiten mit https aufgerufen werden und, wenn eine andere Seite aufgerufen wird, wieder auf http zurückgewechselt wird.

    Die Anweisungen zum Zurückwechseln bewirken nun seit einem Update auf 3.2.12, dass ich beim Aufruf der betroffenen Seite immer auf der Startseite herauskomme ?!?

    Woran kann das liegen? Ich kann das Phänomen nicht nachvollziehen.

    Vielen Dank
    Timon

  11. #11
    Wandelndes Contao-Lexikon Avatar von tab
    Registriert seit
    22.10.2013.
    Beiträge
    10.077
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Ich würde eventuell mal deine - vermutlich aus der älteren Version übernommene - .htaccess mit der .htaccess.default von 3.2.12 vergleichen. Da hat sich zumindest zwischen 3.2.9 und 3.2.12 einiges geändert. Natürlich weiss ich auch nicht, ob dein Problem daran liegen kann, aber vielleicht hilft es ja, deine Änderungen an der .htaccess in die neue Version zu übertragen.

  12. #12
    Contao-Fan Avatar von fabil
    Registriert seit
    10.11.2010.
    Beiträge
    383

    Standard

    Hallo Timon,

    komisch, denn bei mir klappt noch alles. Kannst du mal deine .htaccess hier posten?

    Viele Grüße
    Fabi
    Github-Account: https://github.com/fabil

  13. #13
    Contao-Nutzer Avatar von Timon
    Registriert seit
    18.12.2010.
    Ort
    Fellbach bei Stuttgart
    Beiträge
    54

    Standard

    Hallo Fabi,

    wie gesagt es geht um eine Contao 3.2.12 Installation und das ist die gante .htaccess.
    Der Weiterleitungscode steht nach dem "RewriteBase /"

    Wenn ich auf die Seite Kontakt klicke, komme ich auf index.html raus.

    Code:
    ##
    # Contao Open Source CMS
    #
    # Copyright (c) 2005-2014 Leo Feyer
    #
    # @package Core
    # @link    https://contao.org
    # @license http://www.gnu.org/licenses/lgpl-3.0.html LGPL
    ##
    
    ##
    # 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|woff|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
      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>
    
    </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 /
    
      #Weiterleitung eintzelner Seiten auf HTTPS:
      RewriteCond %{SERVER_PORT} !=443
      RewriteCond %{REQUEST_URI} ^\/kontakt\.html
      RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
      RewriteCond %{SERVER_PORT} ^443
      RewriteCond %{REQUEST_URI} !^\/kontakt\.html [NC]
      RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
      ##
      # Uncomment the following lines to add "www." to the domain:
      #
         RewriteCond %{HTTP_HOST} ^meinedomain\.de$ [NC]
         RewriteRule (.*) http://www.meinedomain.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 second
      # 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|woff|svg|svgz|ttf|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]
    
    </IfModule>
    Danke für die Hilfe.

    Gruß
    Timon

  14. #14
    Alter Contao-Hase
    Registriert seit
    22.06.2009.
    Ort
    Köln
    Beiträge
    1.342

    Standard

    ich werfe mal meine Frage hier rein:

    Ich möchte die gesamte Seite (Contao 3.2.9) auf die SSL Version umleiten lassen.
    Dazu habe ich folgenden Code eingefügt:

    Code:
    RewriteCond %{SERVER_PORT} !=443
    RewriteCond %{HTTP_HOST}    domainname.de$ 
    RewriteRule (.*) https://www.domainname.de/$1 [R=301,L]
    	 
    RewriteCond %{HTTP_HOST}    !^www.
    RewriteCond %{HTTP_HOST}    domainname.de$
    RewriteRule ^(.*)$ https://www.domainname.de/$1 [L,R=301]
    Ich lasse auch die Domain automatisch umschreiben.

    Aber dann wird nicht auf die index.php umgeleitet.

    Was mache ich falsch? Ist der Coder richtig?
    Und wo muss ich diesen in der htaccess einfügen?

    Danke

    Grüße
    Matu
    Viele Grüße aus Köln
    Matu

  15. #15
    Contao-Fan Avatar von pandroid
    Registriert seit
    15.08.2009.
    Ort
    Jena
    Beiträge
    314

    Standard

    Zitat Zitat von Timon Beitrag anzeigen

    Wenn ich auf die Seite Kontakt klicke, komme ich auf index.html raus.
    Hallo Timon,

    ich habe genau das gleiche Problem bei CTO 3.4.5.
    Hast Du eine Lösung für dich finden können? Ich will nur eine einzige Seite als über SSL ausgeben lassen. So bald eine andere aufgerufen wird, ohne SSL.
    LG
    PAndroid

  16. #16
    Contao-Nutzer
    Registriert seit
    29.10.2010.
    Beiträge
    185

    Standard

    Was spricht dagegen die gesamte Webseite unter SSL laufen zu lassen?

    Hat doch eigentlich nur Vorteile oder gibt es Probleme mit der Performance?
    Dann würde ich mir jedoch andere Gedanken machen.

  17. #17
    Contao-Fan Avatar von Infidel
    Registriert seit
    25.05.2012.
    Ort
    Hattingen an der Ruhr
    Beiträge
    537

    Standard

    Hallo,

    auch ich würde gerne nur den Login-Bereich über SSL laufen lassen (insbesondere wegen Analytics und AdWords). Hat da jemand einen guten Weg gefunden?

    LG Fidel

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
  •