Guest User

Untitled

a guest
Jun 18th, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##
  2. # Contao Open Source CMS
  3. # Copyright (C) 2005-2012 Leo Feyer
  4. #
  5. # Formerly known as TYPOlight Open Source CMS.
  6. #
  7. # This program is free software: you can redistribute it and/or
  8. # modify it under the terms of the GNU Lesser General Public
  9. # License as published by the Free Software Foundation, either
  10. # version 3 of the License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. # Lesser General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Lesser General Public
  18. # License along with this program. If not, please visit the Free
  19. # Software Foundation website at <http://www.gnu.org/licenses/>.
  20. #
  21. # PHP version 5
  22. # @copyright  Leo Feyer 2005-2012
  23. # @author     Leo Feyer <http://www.contao.org>
  24. # @license    LGPL
  25. ##
  26.  
  27. ##
  28. # Disable ETags
  29. # @see http://developer.yahoo.com/performance/rules.html#etags
  30. ##
  31. FileETag None
  32. <IfModule mod_headers.c>
  33.   Header unset ETag
  34. </IfModule>
  35.  
  36. ##
  37. # Prevent access to the Contao template files
  38. ##
  39. <FilesMatch "\.(tpl|html5|xhtml)$">
  40.   Order allow,deny
  41.   Deny from all
  42. </FilesMatch>
  43.  
  44. ##
  45. # Set the proper MIME types
  46. # @see https://github.com/h5bp/html5-boilerplate
  47. ##
  48. <IfModule mod_mime.c>
  49.   # JavaScript
  50.   AddType application/javascript              js jsonp
  51.   AddType application/json                    json
  52.   # Audio
  53.   AddType audio/ogg                           oga ogg
  54.   AddType audio/mp4                           m4a f4a f4b
  55.   # Video
  56.   AddType video/ogg                           ogv
  57.   AddType video/mp4                           mp4 m4v f4v f4p
  58.   AddType video/webm                          webm
  59.   AddType video/x-flv                         flv
  60.   # SVG
  61.   AddType image/svg+xml                       svg svgz
  62.   AddEncoding gzip                            svgz
  63.   # Webfonts
  64.   AddType application/vnd.ms-fontobject       eot
  65.   AddType application/x-font-ttf              ttf ttc
  66.   AddType font/opentype                       otf
  67.   AddType application/x-font-woff             woff
  68.   # Assorted types
  69.   AddType image/x-icon                        ico
  70.   AddType image/webp                          webp
  71.   AddType text/cache-manifest                 appcache manifest
  72.   AddType text/x-component                    htc
  73.   AddType application/xml                     rss atom xml rdf
  74.   AddType application/x-web-app-manifest+json webapp
  75.   AddType text/x-vcard                        vcf
  76.   AddType application/x-shockwave-flash       swf
  77. </IfModule>
  78.  
  79. ##
  80. # Gzip compression
  81. # @see https://github.com/h5bp/html5-boilerplate
  82. ##
  83. <IfModule mod_deflate.c>
  84.   # Current Apache versions (>= 2.2)
  85.   <IfModule filter_module>
  86.     FilterDeclare   COMPRESS
  87.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
  88.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
  89.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
  90.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
  91.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
  92.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
  93.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
  94.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
  95.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
  96.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
  97.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
  98.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
  99.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
  100.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/x-icon
  101.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
  102.     FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
  103.     FilterChain     COMPRESS
  104.     FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
  105.   </IfModule>
  106.   # Legacy Apache versions
  107.   <IfModule !mod_filter.c>
  108.     AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  109.     AddOutputFilterByType DEFLATE application/javascript
  110.     AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
  111.     AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
  112.     AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
  113.   </IfModule>
  114. </IfModule>
  115.  
  116. ##
  117. # Expires headers (for better cache control)
  118. # @see https://github.com/h5bp/html5-boilerplate
  119. ##
  120. <IfModule mod_expires.c>
  121.   ExpiresActive on
  122.   ExpiresByType text/cache-manifest           "access plus 0 seconds"
  123.   ExpiresByType text/html                     "access plus 0 seconds"
  124.   # Data
  125.   ExpiresByType text/xml                      "access plus 0 seconds"
  126.   ExpiresByType application/xml               "access plus 0 seconds"
  127.   ExpiresByType application/json              "access plus 0 seconds"
  128.   # Feed
  129.   ExpiresByType application/rss+xml           "access plus 1 hour"
  130.   ExpiresByType application/atom+xml          "access plus 1 hour"
  131.   # Media: images, video, audio
  132.   ExpiresByType image/gif                     "access plus 1 month"
  133.   ExpiresByType image/png                     "access plus 1 month"
  134.   ExpiresByType image/jpg                     "access plus 1 month"
  135.   ExpiresByType image/jpeg                    "access plus 1 month"
  136.   ExpiresByType image/x-icon                  "access plus 1 month"
  137.   ExpiresByType video/ogg                     "access plus 1 month"
  138.   ExpiresByType audio/ogg                     "access plus 1 month"
  139.   ExpiresByType video/mp4                     "access plus 1 month"
  140.   ExpiresByType video/webm                    "access plus 1 month"
  141.   # HTC files  (css3pie)
  142.   ExpiresByType text/x-component              "access plus 1 month"
  143.   # Webfonts
  144.   ExpiresByType application/x-font-ttf        "access plus 1 month"
  145.   ExpiresByType font/opentype                 "access plus 1 month"
  146.   ExpiresByType application/x-font-woff       "access plus 1 month"
  147.   ExpiresByType image/svg+xml                 "access plus 1 month"
  148.   ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  149.   # CSS and JavaScript
  150.   ExpiresByType text/css                      "access plus 1 year"
  151.   ExpiresByType application/javascript        "access plus 1 year"
  152. </IfModule>
  153.  
  154. ##
  155. # Add a Vary Accept-Encoding header for the compressed resources. If you
  156. # modify the file types above, make sure to change them here accordingly.
  157. # @see http://developer.yahoo.com/performance/rules.html#gzip
  158. ##
  159. <IfModule mod_headers.c>
  160.   <FilesMatch "\.(js|css|xml|gz)$">
  161.     Header append Vary Accept-Encoding
  162.   </FilesMatch>
  163. </IfModule>
  164.  
  165. ##
  166. # URL rewriting
  167. ##
  168. <IfModule mod_rewrite.c>
  169.   RewriteEngine On
  170.  
  171.   ##
  172.   # Change the RewriteBase if your Contao installation is in a subdirectoy and
  173.   # the rewrite rules are not working properly. Usage examples:
  174.   #
  175.   #   RewriteBase /contao-2.11.0
  176.   #   RewriteBase /path/to/contao
  177.   #
  178.   # Depending on your server, you might have to remove the line entirely.
  179.   ##
  180.   RewriteBase /
  181.  
  182.   ##
  183.   # Uncomment the following lines and replace "domain.com" with your domain
  184.   # name to redirect requests without "www" to the correct domain.
  185.   ##
  186.   RewriteCond %{HTTP_HOST} ^alpsteinsport\.ch [NC]
  187.   RewriteRule (.*) http://www.alpsteinsport.ch/$1 [R=301,L]
  188.  
  189.   ##
  190.   # If you cannot use mod_deflate, uncomment the following lines to load a
  191.   # compressed .gz version of the aggregated Contao JavaScript and CSS files.
  192.   ##
  193.   #AddEncoding gzip .gz
  194.   #<FilesMatch "\.js\.gz$">
  195.   #  AddType "text/javascript" .gz
  196.   #</FilesMatch>
  197.   #<FilesMatch "\.css\.gz$">
  198.   #  AddType "text/css" .gz
  199.   #</FilesMatch>
  200.   #RewriteCond %{HTTP:Accept-encoding} gzip
  201.   #RewriteCond %{REQUEST_FILENAME} \.(js|css)$
  202.   #RewriteCond %{REQUEST_FILENAME}.gz -f
  203.   #RewriteRule ^(.*)$ $1.gz [QSA,L]
  204.  
  205.   ##
  206.   # Do not rewrite requests for static files or folders such as style sheets,
  207.   # images, movies or text documents. Do not add the URL suffix here!
  208.   ##
  209.   <FilesMatch "\.(htm|php|js|css|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|eot|woff|svg|ttf|pdf|gz)$">
  210.     RewriteEngine Off
  211.   </FilesMatch>
  212.  
  213.   ##
  214.   # By default, Contao adds ".html" to the generated URLs to simulate static
  215.   # HTML documents. If you change the URL suffix in the back end settings, make
  216.   # sure to change it here accordingly!
  217.   #
  218.   #   RewriteRule .*\.html$ index.php [L]   # URL suffix .html
  219.   #   RewriteRule .*\.txt$ index.php [L]    # URL suffix .txt
  220.   #   RewriteRule .*\.json$ index.php [L]   # URL suffix .json
  221.   #
  222.   # If you do not want to use an URL suffix at all, you have to add a second
  223.   # line to prevent URLs that point to folders from being rewritten (see #4031).
  224.   #
  225.      RewriteCond %{REQUEST_FILENAME} !-d
  226.   #
  227.   # If you are using mod_cache, it is recommended to use the RewriteRule below,
  228.   # which adds the query string to the internal URL:
  229.   #
  230.   #   RewriteRule (.*\.html)$ index.php/$1 [L]
  231.   #
  232.   # Note that not all environments support mod_rewrite and mod_cache.
  233.   ##
  234.   RewriteCond %{REQUEST_FILENAME} !-f
  235.   RewriteRule .*\.html$ index.php [L]
  236.  
  237.   ##
  238.   # The following rules are required if you want to pass the language as first
  239.   # URL parameter (added in Contao 2.11). The first rule rewrites an empty URL
  240.   # to the front end controller, the second one adds a missing trailing slash.
  241.   ##
  242.   RewriteRule ^[a-z]{2}/$ index.php [L]
  243.   RewriteRule ^([a-z]{2})$ $1/ [R=301,L]
  244.  
  245. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment