Ergebnis 1 bis 29 von 29

Thema: [Erledigt] Installation auf 1&1 geht nur ohne www.

  1. #1
    laRocca
    Gast

    Standard [Erledigt] Installation auf 1&1 geht nur ohne www.

    Heute soll eine Seite von mir online gehen. Der Kunde ist bei 1&1.

    Ich habe die Index.htm vom FTP gelöscht und die Seite aufgerufen. Läuft auch alles –*aber nur unter
    restaurant-herr-schulz.de

    nicht unter www.restaurant-herr-schulz.de - da wird keine root page gefunden.

    Jetzt hab ich bei 1&1 angerufen und der Mensch im Callcenter hat mir gesagt, dass das an meiner Index.php liegen würde - die wäre so gescripted, dass das nicht geht. Stimmt das? Und wie stelle ich ein, dass die Seite auch unter der www. Adresse läuft?

    Vielen Dank schon mal für Eure Mühen
    Geändert von laRocca (15.02.2013 um 12:57 Uhr)

  2. #2
    Contao-Yoda Avatar von MacKP
    Registriert seit
    15.06.2009.
    Ort
    Duisburg
    Beiträge
    13.292
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Hallo laRocca,
    es ist inzwischen unüblich beide URLs zu bedienen (aus angst vor DoubleContent Problemem bei Google).
    Deswegen geht man normalerweise hin und leitet entweder alles von www. zur Seite ohne www oder umgekehrt. Dafür ist in der Contao default.htaccess auch eine Vorlage, die man nur anpassen muss und auskommentieren.

    Viele Grüße
    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
    [Arbeitet bei -> Paus Design & Medien]
    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

  3. #3
    laRocca
    Gast

    Standard

    mhh ok.. und wo finde ich die default.htaccess und wie kommentiere ich was genau aus?

    (Sry - ich bin da wirklich überhaupt nicht informiert)

  4. #4
    Contao-Yoda Avatar von MacKP
    Registriert seit
    15.06.2009.
    Ort
    Duisburg
    Beiträge
    13.292
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Äh im root Ordner von Contao.. muss umbenannt werden in .htaccess. Wenn du das index.php schon weg bekommen hast, dann musstest du genau diese Datei bearbeiten. Weiterführende Infos findest du hier mit der Suche oder in den Anleitungen von Contao ;-)

    Viele Grüße
    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
    [Arbeitet bei -> Paus Design & Medien]
    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

  5. #5
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Hi,

    steht doch drin in der htaccess:

    Code:
      ##
      # Uncomment to redirect domains without "www" to the "www" subdomain.
      ##
      #RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
      #RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    
      ##
      # Uncomment to redirect domains with "www" to the empty domain.
      ##
      #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
      #RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
    Da suchst du dir die Variante von beiden aus, die du brauchst, und entfernst vor dem 'Rewrite' jeweils die Raute.

  6. #6
    laRocca
    Gast

    Standard

    Zitat Zitat von MacKP Beitrag anzeigen
    Äh im root Ordner von Contao.. muss umbenannt werden in .htaccess. Wenn du das index.php schon weg bekommen hast, dann musstest du genau diese Datei bearbeiten. Weiterführende Infos findest du hier mit der Suche oder in den Anleitungen von Contao ;-)

    Viele Grüße
    Ich hab nur auf meinem FTP Client die Index.htm gelöscht - nicht die Index.php

    Die .htaccess liegt doch normal im Root Verzeichnis - da ist sie aber nicht im Filezilla - wie soll ich sie dann bearbeiten?
    Oder versteh ich irgendwas verkehrt?

  7. #7
    laRocca
    Gast

    Standard

    im ordner System hab ich jetzt ne .htaccess gefunden. Da steht aber drin: order deny,allow
    deny from all

    und nicht wie willshedo gesagt hat.. mhh
    ##
    # Uncomment to redirect domains without "www" to the "www" subdomain.
    ##
    #RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
    #RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    ##
    # Uncomment to redirect domains with "www" to the empty domain.
    ##
    #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    #RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]

  8. #8
    Contao-Yoda Avatar von MacKP
    Registriert seit
    15.06.2009.
    Ort
    Duisburg
    Beiträge
    13.292
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Im root Ordner liegt normalerweise eine default.htaccess, die man umbenennen sollte, wenn man die benutzten möchte.
    Wenn die bei dir nicht da ist, dann lade die noch mal neu hoch.

    Was du dann aber auch machen solltest, ist die URL-Umschreiben.

    Viele Grüße
    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
    [Arbeitet bei -> Paus Design & Medien]
    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

  9. #9
    laRocca
    Gast

    Standard

    danke schon mal für den support!

    im root ordner liegt keine default.htaccess
    ich würde sie nochmal hochladen, aber woher krieg ich die denn? oder muss ich die selbst erstellen?

    und was meinst damit, dass ich die URL umschreiben sollte? diese einstellung im backend "urls umschreiben"?

  10. #10
    Contao-Yoda Avatar von MacKP
    Registriert seit
    15.06.2009.
    Ort
    Duisburg
    Beiträge
    13.292
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Du bekommst die mit Contao... Zur Not Contao noch mal runter laden und entpacken. Da sollte die dann drinn sein.
    Ja, dann auch URL-Umschreiben einschalten. Wie gesagt wirst du mehr Infos finden, wenn du mal die Suche bemühst.

    Viele Grüße
    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
    [Arbeitet bei -> Paus Design & Medien]
    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

  11. #11
    laRocca
    Gast

    Standard

    ich hab jetzt in

    Contao 11.8
    Bildschirmfoto 2013-02-15 um 11.35.30.png

    Contao 11.9
    Bildschirmfoto 2013-02-15 um 11.35.25.png

    Contao 3.0.4
    Bildschirmfoto 2013-02-15 um 11.36.43.png

    nachgeschaut und nirgends ist eine default.htaccess datei.. ich versteh das nicht

  12. #12
    Contao-Yoda Avatar von MacKP
    Registriert seit
    15.06.2009.
    Ort
    Duisburg
    Beiträge
    13.292
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Ah, das ist eine .htaccess.deault. Entschuldige.
    Dadurch das da ein . vor ist, ist diese Datei versteckt und nur zu sehen, wenn du bei dir einstellst, das auch versteckte Dateien zu sehen sind. Wundert mich nur, das du die .htaccess in nem Unterordner findest, aber nicht in einem Hauptordner...

    Viele Grüße
    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
    [Arbeitet bei -> Paus Design & Medien]
    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

  13. #13
    laRocca
    Gast

    Standard

    das war ja auf dem ftp - nicht im finder.

    ich hab das jetzt im terminal eingestellt und die datei ENDLICH gefunden : )

    ich hab den eintrag jetzt folgendermaßen geändert:

    HTML-Code:
      ##
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www" to the correct domain. 
      ##
     RewriteCond %{HTTP_HOST} ^restaurant-herr-schulz\.de [NC]
     RewriteRule (.*) http://restaurant-herr-schulz.de/$1 [R=301,L]
    ist das dann richtig so? und jetzt nur noch hochladen und urls umschreiben anklicken?

  14. #14
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Das ist grade falschrum.

    Du leitest jetzt domains ohne www nach Domains ohne www.... :-)
    Geändert von willshedo (15.02.2013 um 11:25 Uhr)

  15. #15
    Contao-Yoda Avatar von MacKP
    Registriert seit
    15.06.2009.
    Ort
    Duisburg
    Beiträge
    13.292
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Vergiss nicht die Rewrite Base auf / zu setzten und zu aktivieren.
    Sonst klappt das auch nicht wirklich...

    Viele Grüße
    Contao Pool | C-C-A | MetaModels | [Internetseite -> Mediendepot Ruhr]
    [Arbeitet bei -> Paus Design & Medien]
    "I can EXPLAIN it to you, but I can't UNDERSTAND it for you."

  16. #16
    laRocca
    Gast

    Standard

    OHJE...

    Fehler: Umleitungsfehler
    Die aufgerufene Website leitet die Anfrage so um, dass sie nie beendet werden kann.
    Dieses Problem kann manchmal auftreten, wenn Cookies deaktiviert oder abgelehnt werden.
    Was ist denn verkehrt an meinem eintrag? Und wie mach ich das jetzt schnell richtig?

    P.S. URLs umschreiben ist aktiviert.

  17. #17
    laRocca
    Gast

    Standard

    Zitat Zitat von MacKP Beitrag anzeigen
    Vergiss nicht die Rewrite Base auf / zu setzten und zu aktivieren.
    Sonst klappt das auch nicht wirklich...

    Viele Grüße
    Du meinst den Haken setzen im Backend: URLs umschreiben..? Ne?

  18. #18
    laRocca
    Gast

    Standard

    Zitat Zitat von willshedo Beitrag anzeigen
    Das ist grade falschrum.

    Du leitest jetzt domains ohne www nach Domains ohne www.... :-)
    ##
    # Uncomment the following lines and replace "domain.com" with your domain
    # name to redirect requests without "www" to the correct domain.
    ##
    RewriteCond %{HTTP_HOST} ^www.restaurant-herr-schulz\.de [NC]
    RewriteRule (.*) http://www.restaurant-herr-schulz.de/$1 [R=301,L]
    --> WÄRE DAS RICHTIG??

  19. #19
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Nee.

    Du willst ja eine DOmain mit www vorndran nach einer ohne www vorndran umleiten.

    Versuchs mal so (mit deinem Domainnamen, das www darf nur in einer Zeile vorkommen):

    RewriteCond %{HTTP_HOST} www\.xy\.de
    RewriteRule ^(.*)$ xy/$1

  20. #20
    laRocca
    Gast

    Standard

    ich hab das jetzt hierauf geändert:

    ##
    # Uncomment the following lines and replace "domain.com" with your domain
    # name to redirect requests without "www" to the correct domain.
    ##
    RewriteCond %{HTTP_HOST} www\.restaurant-herr-schulz\.de
    RewriteRule ^(.*)$ restaurant-herr-schulz/$1

    und unter http://www.restaurant-herr-schulz.de/ einen internal server error geerntet..
    ich verstehe nicht was ich falsch mache

  21. #21
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Such mal in deiner htaccess, ob diese zwei Zeilen

    RewriteEngine On
    und
    RewriteBase /

    evtl Rauten vornedran haben. Die Rauten musst du entfernen.

  22. #22
    laRocca
    Gast

    Standard

    So hab ich das jetzt gemacht - ist das richtig?
    Ich krieg immernoch einen ServerError : (

    Code:
    ##
    # Contao Open Source CMS
    # Copyright (C) 2005-2013 Leo Feyer
    #
    # Formerly known as TYPOlight Open Source CMS.
    #
    # This program is free software: you can redistribute it and/or
    # modify it under the terms of the GNU Lesser General Public
    # License as published by the Free Software Foundation, either
    # version 3 of the License, or (at your option) any later version.
    # 
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # Lesser General Public License for more details.
    # 
    # You should have received a copy of the GNU Lesser General Public
    # License along with this program. If not, please visit the Free
    # Software Foundation website at <http://www.gnu.org/licenses/>.
    #
    # PHP version 5
    # @copyright  Leo Feyer 2005-2013
    # @author     Leo Feyer <https://contao.org>
    # @license    LGPL
    ##
    
    ##
    # Disable ETags
    # @see http://developer.yahoo.com/performance/rules.html#etags
    ##
    FileETag None
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    
    ##
    # Prevent access to the Contao template files
    ##
    <FilesMatch "\.(tpl|html5|xhtml)$">
      Order allow,deny
      Deny from all
    </FilesMatch>
    
    ##
    # Set the proper MIME types
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_mime.c>
      # JavaScript
      AddType application/javascript              js jsonp
      AddType application/json                    json
      # Audio
      AddType audio/ogg                           oga ogg
      AddType audio/mp4                           m4a f4a f4b
      # Video
      AddType video/ogg                           ogv
      AddType video/mp4                           mp4 m4v f4v f4p 
      AddType video/webm                          webm
      AddType video/x-flv                         flv
      # SVG
      AddType image/svg+xml                       svg svgz
      AddEncoding gzip                            svgz
      # Webfonts
      AddType application/vnd.ms-fontobject       eot
      AddType application/x-font-ttf              ttf ttc
      AddType font/opentype                       otf
      AddType application/x-font-woff             woff
      # Assorted types
      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>
      # Current Apache versions (>= 2.2)
      <IfModule filter_module>
        FilterDeclare   COMPRESS
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/x-icon
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
        FilterChain     COMPRESS
        FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
      </IfModule>
      # Legacy Apache versions
      <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
      ExpiresByType text/cache-manifest           "access plus 0 seconds"
      ExpiresByType text/html                     "access plus 0 seconds"
      # Data
      ExpiresByType text/xml                      "access plus 0 seconds"
      ExpiresByType application/xml               "access plus 0 seconds"
      ExpiresByType application/json              "access plus 0 seconds"
      # Feed
      ExpiresByType application/rss+xml           "access plus 1 hour"
      ExpiresByType application/atom+xml          "access plus 1 hour"
      # Media: images, video, audio
      ExpiresByType image/gif                     "access plus 1 month"
      ExpiresByType image/png                     "access plus 1 month"
      ExpiresByType image/jpg                     "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"
      # HTC files  (css3pie)
      ExpiresByType text/x-component              "access plus 1 month"
      # Webfonts
      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"
      # CSS and JavaScript
      ExpiresByType text/css                      "access plus 1 year"
      ExpiresByType application/javascript        "access plus 1 year"
    </IfModule>
    
    ##
    # 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
    ##
    <IfModule mod_headers.c>
      <FilesMatch "\.(js|css|xml|gz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    </IfModule>
    
    ##
    # 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-2.11.0
    RewriteBase /path/to/contao
      #
      # Depending on your server, you might have to remove the line entirely. 
      ##
      RewriteBase /
    
      ##
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www" to the correct domain. 
      ##
    RewriteCond %{HTTP_HOST} www\.restaurant-herr-schulz\.de
    RewriteRule ^(.*)$ restaurant-herr-schulz/$1 
    
      ##
      # 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 "text/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]
    
      ##
      # Do not rewrite requests for static files or folders such as style sheets,
      # images, movies or text documents. Do not add the URL suffix here!
      ##
      <FilesMatch "\.(htm|php|js|css|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|eot|woff|svg|ttf|pdf|gz)$">
        RewriteEngine Off
      </FilesMatch>
    
      ##
      # 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
      #
      # 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} !-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 an empty URL
      # to the front end controller, the second one adds a missing trailing slash.
      ##
      RewriteRule ^[a-z]{2}/$ index.php [L]
      RewriteRule ^([a-z]{2})$ $1/ [R=301,L]
    
    </IfModule>

  23. #23
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Nein.

    Nur die beiden genannten Zeilen. DIese
    RewriteBase /contao-2.11.0
    RewriteBase /path/to/contao
    auf keinen Fall auskommentieren, laß da die Raute davor :-)

  24. #24
    laRocca
    Gast

    Standard

    ich hab die rauten jetzt wieder hin gemacht.. der internal server error bleibt.
    der code sieht jetzt so aus

    Code:
    ##
    # Contao Open Source CMS
    # Copyright (C) 2005-2013 Leo Feyer
    #
    # Formerly known as TYPOlight Open Source CMS.
    #
    # This program is free software: you can redistribute it and/or
    # modify it under the terms of the GNU Lesser General Public
    # License as published by the Free Software Foundation, either
    # version 3 of the License, or (at your option) any later version.
    # 
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # Lesser General Public License for more details.
    # 
    # You should have received a copy of the GNU Lesser General Public
    # License along with this program. If not, please visit the Free
    # Software Foundation website at <http://www.gnu.org/licenses/>.
    #
    # PHP version 5
    # @copyright  Leo Feyer 2005-2013
    # @author     Leo Feyer <https://contao.org>
    # @license    LGPL
    ##
    
    ##
    # Disable ETags
    # @see http://developer.yahoo.com/performance/rules.html#etags
    ##
    FileETag None
    <IfModule mod_headers.c>
      Header unset ETag
    </IfModule>
    
    ##
    # Prevent access to the Contao template files
    ##
    <FilesMatch "\.(tpl|html5|xhtml)$">
      Order allow,deny
      Deny from all
    </FilesMatch>
    
    ##
    # Set the proper MIME types
    # @see https://github.com/h5bp/html5-boilerplate
    ##
    <IfModule mod_mime.c>
      # JavaScript
      AddType application/javascript              js jsonp
      AddType application/json                    json
      # Audio
      AddType audio/ogg                           oga ogg
      AddType audio/mp4                           m4a f4a f4b
      # Video
      AddType video/ogg                           ogv
      AddType video/mp4                           mp4 m4v f4v f4p 
      AddType video/webm                          webm
      AddType video/x-flv                         flv
      # SVG
      AddType image/svg+xml                       svg svgz
      AddEncoding gzip                            svgz
      # Webfonts
      AddType application/vnd.ms-fontobject       eot
      AddType application/x-font-ttf              ttf ttc
      AddType font/opentype                       otf
      AddType application/x-font-woff             woff
      # Assorted types
      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>
      # Current Apache versions (>= 2.2)
      <IfModule filter_module>
        FilterDeclare   COMPRESS
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/x-icon
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
        FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
        FilterChain     COMPRESS
        FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
      </IfModule>
      # Legacy Apache versions
      <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
      ExpiresByType text/cache-manifest           "access plus 0 seconds"
      ExpiresByType text/html                     "access plus 0 seconds"
      # Data
      ExpiresByType text/xml                      "access plus 0 seconds"
      ExpiresByType application/xml               "access plus 0 seconds"
      ExpiresByType application/json              "access plus 0 seconds"
      # Feed
      ExpiresByType application/rss+xml           "access plus 1 hour"
      ExpiresByType application/atom+xml          "access plus 1 hour"
      # Media: images, video, audio
      ExpiresByType image/gif                     "access plus 1 month"
      ExpiresByType image/png                     "access plus 1 month"
      ExpiresByType image/jpg                     "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"
      # HTC files  (css3pie)
      ExpiresByType text/x-component              "access plus 1 month"
      # Webfonts
      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"
      # CSS and JavaScript
      ExpiresByType text/css                      "access plus 1 year"
      ExpiresByType application/javascript        "access plus 1 year"
    </IfModule>
    
    ##
    # 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
    ##
    <IfModule mod_headers.c>
      <FilesMatch "\.(js|css|xml|gz)$">
        Header append Vary Accept-Encoding
      </FilesMatch>
    </IfModule>
    
    ##
    # 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-2.11.0
    #RewriteBase /path/to/contao
      #
      # Depending on your server, you might have to remove the line entirely. 
      ##
      RewriteBase /
    
      ##
      # Uncomment the following lines and replace "domain.com" with your domain
      # name to redirect requests without "www" to the correct domain. 
      ##
    RewriteCond %{HTTP_HOST} www\.restaurant-herr-schulz\.de
    RewriteRule ^(.*)$ restaurant-herr-schulz/$1 
    
      ##
      # 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 "text/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]
    
      ##
      # Do not rewrite requests for static files or folders such as style sheets,
      # images, movies or text documents. Do not add the URL suffix here!
      ##
      <FilesMatch "\.(htm|php|js|css|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|eot|woff|svg|ttf|pdf|gz)$">
        RewriteEngine Off
      </FilesMatch>
    
      ##
      # 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
      #
      # 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} !-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 an empty URL
      # to the front end controller, the second one adds a missing trailing slash.
      ##
      RewriteRule ^[a-z]{2}/$ index.php [L]
      RewriteRule ^([a-z]{2})$ $1/ [R=301,L]
    
    </IfModule>
    bei den beiden sachen die du sagst sind also keine rauten davor.
    was mach ich denn jetzt noch falsch?

  25. #25
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Hm. Also, formulieren wir mal etwas genauer, evtl nützt das ja was.

    Erstens: versuch mal diese Formulierung:

    Code:
    RewriteCond %{HTTP_HOST} ^www\.restaurant-herr-schulz\.de$ [NC]
    RewriteRule ^(.*)$ http://restaurant-herr-schulz/$1 [R=301,L]
    und zweitens, versuchsweise die Raute vor der Zeile

    RewriteRule (.*\.html)$ index.php/$1 [L]

    entfernen (ziemlich unten.)
    Manchmal nützt es was.

  26. #26
    laRocca
    Gast

    Standard

    ok . jetzt wird die seite auf "restaurant-herr-schulz" umgeleitet - da fehlt jetzt nur noch das ".de" schätze ich - wo muss ich das einfügen?

    P.S. danke schon mal für die exakte erläuterung! das ist sehr nett von dir ; )

  27. #27
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Schreibfehler.

    RewriteCond %{HTTP_HOST} ^www\.restaurant-herr-schulz\.de$ [NC]
    RewriteRule ^(.*)$ http://restaurant-herr-schulz.de/$1 [R=301,L]


    Aber nächstesmal bitte selber mitdenken und nicht alles vorkauen lassen ;-)

  28. #28
    laRocca
    Gast

    Standard

    BOAH - ES FUNKTIONIERT!!
    dankeschön! Ja, Du hast recht - das hätte ich auch selbst blicken können. Aber wenn es um solche themen geht bin ich immer so verunsichert und will nichts falsch machen - und weil das alles spanische Dörfer sind für mich, hab ich dann immer Angst die kleinste Kleinigkeit zu ändern und alles "kaputt" zu machen.

    Ich danke Dir auf jeden Fall für Deine umfassende Hilfestellung und Deine Geduld!

  29. #29
    Gesperrt
    Registriert seit
    23.06.2009.
    Ort
    Rheinfelden
    Beiträge
    322

    Standard

    Aber wenn es um solche themen geht bin ich immer so verunsichert und will nichts falsch machen
    Aber nur durch Probieren und Fehlermachen lernt mans. Die Profis haben das auch nur durchs immer wieder Selbermachen gelernt.
    Wenn du Webseiten-Profi werden willst, kommst du um 'solche Sachen' nicht drumrum

    Nette Grafik übrigens. Nur das Holz scrollt so weit nach unten...

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
  •