Advertisement
Guest User

Untitled

a guest
Jul 25th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.20 KB | None | 0 0
  1. # BEGIN WP Rocket v3.3.4
  2. # Use UTF-8 encoding for anything served text/plain or text/html
  3. AddDefaultCharset UTF-8
  4. # Force UTF-8 for a number of file formats
  5. <IfModule mod_mime.c>
  6. AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
  7. </IfModule>
  8. # FileETag None is not enough for every server.
  9. <IfModule mod_headers.c>
  10. Header unset ETag
  11. </IfModule>
  12. # Since we’re sending far-future expires, we don’t need ETags for static content.
  13. # developer.yahoo.com/performance/rules.html#etags
  14. FileETag None
  15. <IfModule mod_alias.c>
  16. <FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$">
  17. <IfModule mod_headers.c>
  18. Header set X-Powered-By "WP Rocket/3.3.4"
  19. Header unset Pragma
  20. Header append Cache-Control "public"
  21. Header unset Last-Modified
  22. </IfModule>
  23. </FilesMatch>
  24. <FilesMatch "\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
  25. <IfModule mod_headers.c>
  26. Header unset Pragma
  27. Header append Cache-Control "public"
  28. </IfModule>
  29. </FilesMatch>
  30. </IfModule>
  31. # Expires headers (for better cache control)
  32. <IfModule mod_expires.c>
  33. ExpiresActive on
  34. # Perhaps better to whitelist expires rules? Perhaps.
  35. ExpiresDefault "access plus 1 month"
  36. # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  37. ExpiresByType text/cache-manifest "access plus 0 seconds"
  38. # Your document html
  39. ExpiresByType text/html "access plus 0 seconds"
  40. # Data
  41. ExpiresByType text/xml "access plus 0 seconds"
  42. ExpiresByType application/xml "access plus 0 seconds"
  43. ExpiresByType application/json "access plus 0 seconds"
  44. # Feed
  45. ExpiresByType application/rss+xml "access plus 1 hour"
  46. ExpiresByType application/atom+xml "access plus 1 hour"
  47. # Favicon (cannot be renamed)
  48. ExpiresByType image/x-icon "access plus 1 week"
  49. # Media: images, video, audio
  50. ExpiresByType image/gif "access plus 4 months"
  51. ExpiresByType image/png "access plus 4 months"
  52. ExpiresByType image/jpeg "access plus 4 months"
  53. ExpiresByType image/webp "access plus 4 months"
  54. ExpiresByType video/ogg "access plus 1 month"
  55. ExpiresByType audio/ogg "access plus 1 month"
  56. ExpiresByType video/mp4 "access plus 1 month"
  57. ExpiresByType video/webm "access plus 1 month"
  58. # HTC files (css3pie)
  59. ExpiresByType text/x-component "access plus 1 month"
  60. # Webfonts
  61. ExpiresByType font/ttf "access plus 4 months"
  62. ExpiresByType font/otf "access plus 4 months"
  63. ExpiresByType font/woff "access plus 4 months"
  64. ExpiresByType font/woff2 "access plus 4 months"
  65. ExpiresByType image/svg+xml "access plus 1 month"
  66. ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  67. # CSS and JavaScript
  68. ExpiresByType text/css "access plus 1 year"
  69. ExpiresByType application/javascript "access plus 1 year"
  70. </IfModule>
  71. # Gzip compression
  72. <IfModule mod_deflate.c>
  73. # Active compression
  74. SetOutputFilter DEFLATE
  75. # Force deflate for mangled headers
  76. <IfModule mod_setenvif.c>
  77. <IfModule mod_headers.c>
  78. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  79. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  80. # Don’t compress images and other uncompressible content
  81. SetEnvIfNoCase Request_URI \
  82. \.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
  83. </IfModule>
  84. </IfModule>
  85. # Compress all output labeled with one of the following MIME-types
  86. <IfModule mod_filter.c>
  87. AddOutputFilterByType DEFLATE application/atom+xml \
  88. application/javascript \
  89. application/json \
  90. application/rss+xml \
  91. application/vnd.ms-fontobject \
  92. application/x-font-ttf \
  93. application/xhtml+xml \
  94. application/xml \
  95. font/opentype \
  96. image/svg+xml \
  97. image/x-icon \
  98. text/css \
  99. text/html \
  100. text/plain \
  101. text/x-component \
  102. text/xml
  103. </IfModule>
  104. <IfModule mod_headers.c>
  105. Header append Vary: Accept-Encoding
  106. </IfModule>
  107. </IfModule>
  108. # END WP Rocket
  109. # BEGIN [SEO_REDIRECTION]
  110. ErrorDocument 404 /index.php?error=404
  111. # END [SEO_REDIRECTION]
  112. # BEGIN WordPress
  113. <IfModule mod_rewrite.c>
  114. RewriteEngine On
  115. RewriteBase /
  116. RewriteRule ^index\.php$ - [L]
  117. RewriteCond %{REQUEST_FILENAME} !-f
  118. RewriteCond %{REQUEST_FILENAME} !-d
  119. RewriteRule . /index.php [L]
  120. </IfModule>
  121.  
  122. # END WordPress
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement