Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. #This Apache config file was created by Duplicator Installer on 2019-10-16 04:58:20.
  2. #The original can be found in archived file with the name htaccess.orig
  3.  
  4. # BEGIN WordPress
  5. php_value default_charset utf-8
  6. AddType 'text/html; charset=utf-8' .html .htm .shtml
  7. <IfModule mod_rewrite.c>
  8. RewriteEngine On
  9. RewriteCond %{REQUEST_FILENAME} !-f
  10. RewriteCond %{REQUEST_FILENAME} !-d
  11. RewriteRule . index.php [L]
  12. RewriteCond %{HTTPS} off
  13. RewriteCond %{HTTP:X-Forwarded-Proto} !https
  14. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  15. RewriteCond %{REQUEST_URI} ^\/$
  16. RewriteCond %{HTTP_HOST} ^www\.(.*)$
  17. RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
  18. RewriteCond %{REQUEST_URI} !\?
  19. RewriteCond %{REQUEST_URI} !\&amp;
  20. RewriteCond %{REQUEST_URI} !\=
  21. RewriteCond %{REQUEST_URI} !\.
  22. RewriteCond %{REQUEST_URI} \/$
  23. RewriteCond %{HTTP_HOST} ^www\.(.*)$
  24. RewriteRule ^(.*)\/$ http://%1/$1 [L,R=301]
  25. RewriteCond %{REQUEST_URI} !\?
  26. RewriteCond %{REQUEST_URI} !\&amp;
  27. RewriteCond %{REQUEST_URI} !\=
  28. RewriteCond %{REQUEST_URI} !\.
  29. RewriteCond %{REQUEST_URI} !\/$
  30. RewriteCond %{HTTP_HOST} ^www\.(.*)$
  31. RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
  32. RewriteCond %{REQUEST_URI} !\?
  33. RewriteCond %{REQUEST_URI} !\&amp;
  34. RewriteCond %{REQUEST_URI} !\=
  35. RewriteCond %{REQUEST_URI} !\.
  36. RewriteCond %{REQUEST_URI} \/$
  37. RewriteCond %{HTTP_HOST} ^([^www].*)$
  38. RewriteRule ^(.*)\/$ http://%1/$1 [L,R=301]
  39. </IfModule>
  40. AddType text/css .css
  41. AddType text/xml .xml
  42. AddType application/octet-stream .doc .mov .avi .pdf .xls
  43. # ForceType application/x-httpd-php
  44. <ifModule mod_headers.c>
  45. #кэшировать html и htm файлы на один день
  46. <FilesMatch "\.(html|htm)$">
  47. Header set Cache-Control "max-age=43200"
  48. </FilesMatch>
  49. #кэшировать css, javascript и текстовые файлы на одну неделю
  50. <FilesMatch "\.(js|css|txt)$">
  51. Header set Cache-Control "max-age=604800"
  52. </FilesMatch>
  53. #кэшировать флэш и изображения на месяц
  54. <FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png)$">
  55. Header set Cache-Control "max-age=2592000"
  56. </FilesMatch>
  57. #отключить кэширование
  58. <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
  59. Header unset Cache-Control
  60. </FilesMatch>
  61. </IfModule>
  62. <ifModule mod_expires.c>
  63. ExpiresActive On
  64. #по умолчанию кеш в 5 секунд
  65. ExpiresDefault "access plus 5 seconds"
  66. #кэшировать флэш и изображения на месяц
  67. ExpiresByType image/x-icon "access plus 2592000 seconds"
  68. ExpiresByType image/jpeg "access plus 2592000 seconds"
  69. ExpiresByType image/png "access plus 2592000 seconds"
  70. ExpiresByType image/gif "access plus 2592000 seconds"
  71. ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
  72. #кэшировать css, javascript и текстовые файлы на одну неделю
  73. ExpiresByType text/css "access plus 604800 seconds"
  74. ExpiresByType text/javascript "access plus 604800 seconds"
  75. ExpiresByType application/javascript "access plus 604800 seconds"
  76. ExpiresByType application/x-javascript "access plus 604800 seconds"
  77. #кэшировать html и htm файлы на один день
  78. ExpiresByType text/html "access plus 43200 seconds"
  79. #кэшировать xml файлы на десять минут
  80. ExpiresByType application/xhtml+xml "access plus 600 seconds"
  81. </ifModule>
  82. <IfModule mod_deflate.c>
  83. AddOutputFilterByType DEFLATE application/javascript
  84. AddOutputFilterByType DEFLATE application/rss+xml
  85. AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  86. AddOutputFilterByType DEFLATE application/x-font
  87. AddOutputFilterByType DEFLATE application/x-font-opentype
  88. AddOutputFilterByType DEFLATE application/x-font-otf
  89. AddOutputFilterByType DEFLATE application/x-font-truetype
  90. AddOutputFilterByType DEFLATE application/x-font-ttf
  91. AddOutputFilterByType DEFLATE application/x-javascript
  92. AddOutputFilterByType DEFLATE application/xhtml+xml
  93. AddOutputFilterByType DEFLATE application/xml
  94. AddOutputFilterByType DEFLATE font/opentype
  95. AddOutputFilterByType DEFLATE font/otf
  96. AddOutputFilterByType DEFLATE font/ttf
  97. AddOutputFilterByType DEFLATE image/svg+xml
  98. AddOutputFilterByType DEFLATE image/x-icon
  99. AddOutputFilterByType DEFLATE text/css
  100. AddOutputFilterByType DEFLATE text/html
  101. AddOutputFilterByType DEFLATE text/javascript
  102. AddOutputFilterByType DEFLATE text/plain
  103. AddOutputFilterByType DEFLATE text/xml
  104. BrowserMatch ^Mozilla/4 gzip-only-text/html
  105. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  106. BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  107. Header append Vary User-Agent
  108. </IfModule>
  109. <IfModule mod_gzip.c>
  110. mod_gzip_on Yes
  111. mod_gzip_dechunk Yes
  112. mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
  113. mod_gzip_item_include mime ^text\.*
  114. mod_gzip_item_include mime ^application/x-javascript.*
  115. mod_gzip_item_exclude mime ^image\.*
  116. mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  117. </IfModule>
  118.  
  119. # END WordPress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement