Advertisement
id26327371

.htaccess

Jul 14th, 2016
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. # STARTCOOKIENITRO
  2. <FilesMatch "\.(jpg|jpeg|png|gif|swf|svg|JPG|JPEG|PNG|GIF|SWF|SVG)$">
  3. Header unset Cookie
  4. Header unset Set-Cookie
  5. </FilesMatch>
  6. # ENDCOOKIENITRO
  7. # STARTNITRO
  8. ExpiresActive On
  9.  
  10. #CSS JS XML TXT - 1 WEEK
  11. <FilesMatch "\.(xml|txt|css|js)$">
  12. Header set Cache-Control "max-age=604800, public"
  13. ExpiresDefault "access plus 1 week"
  14. </FilesMatch>
  15.  
  16. #JPG JPEG PNG GIF SWF SVG - 1 MONTH
  17. <FilesMatch "\.(jpg|jpeg|png|gif|swf|svg|JPG|JPEG|PNG|GIF|SWF|SVG)$">
  18. Header set Cache-Control "max-age=2678400, public"
  19. ExpiresDefault "access plus 1 month"
  20. Header set Last-Modified "Wed, 05 Jun 2009 06:40:46 GMT"
  21. </FilesMatch>
  22.  
  23. #OTF WOFF TTF ICO PDF FLV - 1 MONTH
  24. <FilesMatch "\.(otf|ico|pdf|flv|woff|ttf)$">
  25. Header set Cache-Control "max-age=2678400, public"
  26. ExpiresDefault "access plus 1 month"
  27. </FilesMatch>
  28. # ENDNITRO
  29. # STARTCOMPRESSNITRO
  30. RewriteEngine On
  31. RewriteRule .* - [E=HTTP_IF_MODIFIED_SINCE:%{HTTP:If-Modified-Since}]
  32.  
  33. RewriteCond %{SCRIPT_FILENAME} !-d
  34. RewriteRule ^(\/?((catalog)|(assets)).+)\.css$ assets/style.php?l=4&p=$1&c=604800 [NC,L]
  35.  
  36. RewriteCond %{SCRIPT_FILENAME} !-d
  37. RewriteRule ^(\/?((catalog)|(assets)).+)\.js$ assets/script.php?l=4&p=$1&c=604800 [NC,L]
  38. AddType image/svg+xml .svg
  39. AddOutputFilterByType DEFLATE image/svg+xml
  40. AddType application/x-font-woff .woff
  41. AddOutputFilterByType DEFLATE application/x-font-woff
  42. # ENDCOMPRESSNITRO
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. Options +FollowSymlinks
  50.  
  51. # Prevent Directoy listing
  52. Options -Indexes
  53.  
  54. # Prevent Direct Access to files
  55. <FilesMatch "\.(tpl|ini|log)">
  56. Order deny,allow
  57. Deny from all
  58. </FilesMatch>
  59.  
  60. # SEO URL Settings
  61. RewriteEngine On
  62.  
  63. RewriteCond %{HTTP_HOST} ^www.goldwell.pp.ua$ [NC]
  64. RewriteRule ^(.*)$ http://goldwell.pp.ua/$1 [R=301,L]
  65.  
  66. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\ HTTP/
  67.  
  68. RewriteRule ^index\.html$ / [R=301,L]
  69.  
  70. RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
  71.  
  72. RewriteRule ^index\.php$ / [R=301,L]
  73.  
  74. RewriteBase /
  75. RewriteRule ^sitemap.xml$ index.php?route=feed/fast_sitemap [NS,NC,L,QSA]
  76. RewriteRule ^download/(.*) /index.php?route=error/not_found [L]
  77. RewriteCond %{REQUEST_FILENAME} !-f
  78. RewriteCond %{REQUEST_FILENAME} !-d
  79. RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
  80. RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
  81.  
  82.  
  83. #Локаль сервера
  84. SetEnv TZ Europe/Kiev
  85.  
  86.  
  87.  
  88. # кеширование в браузере на стороне пользователя
  89. <IfModule mod_expires.c>
  90. ExpiresActive On
  91. ExpiresDefault "access 7 days"
  92. ExpiresByType application/javascript "access plus 1 year"
  93. ExpiresByType text/javascript "access plus 1 year"
  94. ExpiresByType text/css "access plus 1 year"
  95. ExpiresByType text/html "access plus 7 day"
  96. ExpiresByType text/x-javascript "access 1 year"
  97. ExpiresByType image/gif "access plus 1 year"
  98. ExpiresByType image/jpeg "access plus 1 year"
  99. ExpiresByType image/png "access plus 1 year"
  100. ExpiresByType image/jpg "access plus 1 year"
  101. ExpiresByType image/x-icon "access 1 year"
  102. ExpiresByType application/x-shockwave-flash "access 1 year"
  103. </IfModule>
  104. # Cache-Control
  105. <ifModule mod_headers.c>
  106. # 30 дней
  107. <filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$">
  108. Header set Cache-Control "max-age=2592000, public"
  109. </filesMatch>
  110.  
  111. # 30 дней
  112. <filesMatch "\.(css|js)$">
  113. Header set Cache-Control "max-age=2592000, public"
  114. </filesMatch>
  115.  
  116. # 2 дня
  117. <filesMatch "\.(xml|txt)$">
  118. Header set Cache-Control "max-age=172800, public, must-revalidate"
  119. </filesMatch>
  120.  
  121. # 1 день
  122. <filesMatch "\.(html|htm|php)$">
  123. Header set Cache-Control "max-age=172800, private, must-revalidate"
  124. </filesMatch>
  125. </ifModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement