Advertisement
Guest User

Untitled

a guest
Apr 19th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.24 KB | None | 0 0
  1. # BEGIN HTTPS Redirection Plugin
  2. <IfModule mod_rewrite.c>
  3. RewriteEngine On
  4. RewriteCond %{SERVER_PORT} !^443$
  5. # WP Fastest Cache compatability
  6. RewriteCond %{REQUEST_URI} !wp-content/cache/(all|wpfc-mobile-cache)
  7. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  8. </IfModule>
  9. # END HTTPS Redirection Plugin
  10.  
  11. # BEGIN WpFastestCache
  12. <IfModule mod_rewrite.c>
  13. RewriteEngine On
  14. RewriteBase /
  15. RewriteCond %{HTTPS} =on
  16. RewriteCond %{HTTP_HOST} ^thepreppingguide.com
  17. # Start WPFC Exclude
  18. # End WPFC Exclude
  19. # Start_WPFC_Exclude_Admin_Cookie
  20. RewriteCond %{HTTP:Cookie} !wordpress_logged_in_[^=]+=GeoffsG|Ken|thepreparer|wpps-support
  21. # End_WPFC_Exclude_Admin_Cookie
  22. RewriteCond %{HTTP_HOST} ^thepreppingguide.com
  23. RewriteCond %{HTTP_USER_AGENT} !(facebookexternalhit|WhatsApp|Mediatoolkitbot)
  24. RewriteCond %{HTTP_USER_AGENT} !(WPsFastestsCachesPreload(siPhonesMobile)?s*Bot)
  25. RewriteCond %{REQUEST_METHOD} !POST
  26. RewriteCond %{REQUEST_URI} !(/){2}$
  27. RewriteCond %{REQUEST_URI} /$
  28. RewriteCond %{QUERY_STRING} !.+
  29. RewriteCond %{HTTP:Cookie} !comment_author_
  30. RewriteCond %{HTTP:Cookie} !wp_woocommerce_session
  31. RewriteCond %{HTTP:Cookie} !safirmobilswitcher=mobil
  32. RewriteCond %{HTTP:Profile} !^[a-z0-9"]+ [NC]
  33. RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/all/$1/index.html -f [or]
  34. RewriteCond /home/flyingtech/public_html/thepreppingguide.com/wp-content/cache/all/$1/index.html -f
  35. RewriteRule ^(.*) "/wp-content/cache/all/$1/index.html" [L]
  36. </IfModule>
  37. <FilesMatch "index.(html|htm)$">
  38. AddDefaultCharset UTF-8
  39. <ifModule mod_headers.c>
  40. FileETag None
  41. Header unset ETag
  42. Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
  43. Header set Pragma "no-cache"
  44. Header set Expires "Mon, 29 Oct 1923 20:30:00 GMT"
  45. </ifModule>
  46. </FilesMatch>
  47. # END WpFastestCache
  48. # BEGIN LBCWpFastestCache
  49. <FilesMatch ".(ico|pdf|flv|jpg|jpeg|png|gif|webp|js|css|swf|x-html|css|xml|js|woff|woff2|ttf|svg|eot)(.gz)?$">
  50. <IfModule mod_expires.c>
  51. AddType application/font-woff2 .woff2
  52. ExpiresActive On
  53. ExpiresDefault A0
  54. ExpiresByType image/webp A2592000
  55. ExpiresByType image/gif A2592000
  56. ExpiresByType image/png A2592000
  57. ExpiresByType image/jpg A2592000
  58. ExpiresByType image/jpeg A2592000
  59. ExpiresByType image/ico A2592000
  60. ExpiresByType image/svg+xml A2592000
  61. ExpiresByType text/css A2592000
  62. ExpiresByType text/javascript A2592000
  63. ExpiresByType application/javascript A2592000
  64. ExpiresByType application/x-javascript A2592000
  65. ExpiresByType application/font-woff2 A2592000
  66. </IfModule>
  67. <IfModule mod_headers.c>
  68. Header set Expires "max-age=2592000, public"
  69. Header unset ETag
  70. Header set Connection keep-alive
  71. FileETag None
  72. </IfModule>
  73. </FilesMatch>
  74. # END LBCWpFastestCache
  75.  
  76. ## EXPIRES CACHING ##
  77. <IfModule mod_expires.c>
  78. ExpiresActive On
  79. ExpiresByType image/jpg "access plus 1 year"
  80. ExpiresByType image/jpeg "access plus 1 year"
  81. ExpiresByType image/gif "access plus 1 year"
  82. ExpiresByType image/png "access plus 1 year"
  83. ExpiresByType text/css "access plus 1 month"
  84. ExpiresByType application/pdf "access plus 1 month"
  85. ExpiresByType text/x-javascript "access plus 1 month"
  86. ExpiresByType application/x-shockwave-flash "access plus 1 month"
  87. ExpiresByType image/x-icon "access plus 1 year"
  88. ExpiresDefault "access plus 1 year"
  89. </IfModule>
  90. ## EXPIRES CACHING ##
  91.  
  92. <IfModule mod_rewrite.c>
  93. RewriteEngine On
  94. RewriteBase /
  95. RewriteRule ^index.php$ - [L]
  96. RewriteCond %{REQUEST_FILENAME} !-f
  97. RewriteCond %{REQUEST_FILENAME} !-d
  98. RewriteRule . /index.php [L]
  99. </IfModule>
  100.  
  101. # BEGIN WordPress
  102. <IfModule mod_rewrite.c>
  103. RewriteEngine On
  104. RewriteBase /
  105. RewriteRule ^index.php$ - [L]
  106. RewriteCond %{REQUEST_FILENAME} !-f
  107. RewriteCond %{REQUEST_FILENAME} !-d
  108. RewriteRule . /index.php [L]
  109. </IfModule>
  110.  
  111. # BEGIN gzip file compression
  112. # Compress HTML, CSS, JavaScript, Text, XML and fonts
  113. AddOutputFilterByType DEFLATE application/javascript
  114. AddOutputFilterByType DEFLATE application/rss+xml
  115. AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  116. AddOutputFilterByType DEFLATE application/x-font
  117. AddOutputFilterByType DEFLATE application/x-font-opentype
  118. AddOutputFilterByType DEFLATE application/x-font-otf
  119. AddOutputFilterByType DEFLATE application/x-font-truetype
  120. AddOutputFilterByType DEFLATE application/x-font-ttf
  121. AddOutputFilterByType DEFLATE application/x-javascript
  122. AddOutputFilterByType DEFLATE application/xhtml+xml
  123. AddOutputFilterByType DEFLATE application/xml
  124. AddOutputFilterByType DEFLATE font/opentype
  125. AddOutputFilterByType DEFLATE font/otf
  126. AddOutputFilterByType DEFLATE font/ttf
  127. AddOutputFilterByType DEFLATE image/svg+xml
  128. AddOutputFilterByType DEFLATE image/x-icon
  129. AddOutputFilterByType DEFLATE text/css
  130. AddOutputFilterByType DEFLATE text/html
  131. AddOutputFilterByType DEFLATE text/javascript
  132. AddOutputFilterByType DEFLATE text/plain
  133. AddOutputFilterByType DEFLATE text/xml
  134. # Remove browser bugs
  135. BrowserMatch ^Mozilla/4 gzip-only-text/html
  136. BrowserMatch ^Mozilla/4.0[678] no-gzip
  137. BrowserMatch bMSIE !no-gzip !gzip-only-text/html
  138. Header append Vary User-Agent
  139. # END gzip file compression
  140.  
  141. # END WordPress
  142. # BEGIN WP Performance Score Booster Settings
  143. # END WP Performance Score Booster Settings
  144.  
  145. RewriteEngine On
  146. RewriteCond %{HTTPS} off
  147. RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  148. ## BEGIN EXPIRES CACHING - JCH OPTIMIZE ##
  149. <IfModule mod_expires.c>
  150. ExpiresActive on
  151.  
  152. # Perhaps better to whitelist expires rules? Perhaps.
  153. ExpiresDefault "access plus 1 month"
  154.  
  155. # cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
  156. ExpiresByType text/cache-manifest "access plus 0 seconds"
  157.  
  158. # Your document html
  159. ExpiresByType text/html "access plus 0 seconds"
  160.  
  161. # Data
  162. ExpiresByType text/xml "access plus 0 seconds"
  163. ExpiresByType application/xml "access plus 0 seconds"
  164. ExpiresByType application/json "access plus 0 seconds"
  165.  
  166. # Feed
  167. ExpiresByType application/rss+xml "access plus 1 hour"
  168. ExpiresByType application/atom+xml "access plus 1 hour"
  169.  
  170. # Favicon (cannot be renamed)
  171. ExpiresByType image/x-icon "access plus 1 week"
  172.  
  173. # Media: images, video, audio
  174. ExpiresByType image/gif "access plus 1 month"
  175. ExpiresByType image/png "access plus 1 month"
  176. ExpiresByType image/jpg "access plus 1 month"
  177. ExpiresByType image/jpeg "access plus 1 month"
  178. ExpiresByType video/ogg "access plus 1 month"
  179. ExpiresByType audio/ogg "access plus 1 month"
  180. ExpiresByType video/mp4 "access plus 1 month"
  181. ExpiresByType video/webm "access plus 1 month"
  182.  
  183. # HTC files (css3pie)
  184. ExpiresByType text/x-component "access plus 1 month"
  185.  
  186. # Webfonts
  187. ExpiresByType application/font-ttf "access plus 1 month"
  188. ExpiresByType font/opentype "access plus 1 month"
  189. ExpiresByType application/font-woff "access plus 1 month"
  190. ExpiresByType application/font-woff2 "access plus 1 month"
  191. ExpiresByType image/svg+xml "access plus 1 month"
  192. ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  193.  
  194. # CSS and JavaScript
  195. ExpiresByType text/css "access plus 1 year"
  196. ExpiresByType text/javascript "access plus 1 year"
  197. ExpiresByType application/javascript "access plus 1 year"
  198.  
  199. <IfModule mod_headers.c>
  200. Header append Cache-Control "public"
  201. </IfModule>
  202.  
  203. </IfModule>
  204.  
  205. <IfModule mod_deflate.c>
  206. AddOutputFilterByType DEFLATE text/html
  207. AddOutputFilterByType DEFLATE text/css
  208. AddOutputFilterByType DEFLATE text/javascript
  209. AddOutputFilterByType DEFLATE text/xml
  210. AddOutputFilterByType DEFLATE text/plain
  211. AddOutputFilterByType DEFLATE image/x-icon
  212. AddOutputFilterByType DEFLATE image/svg+xml
  213. AddOutputFilterByType DEFLATE application/rss+xml
  214. AddOutputFilterByType DEFLATE application/javascript
  215. AddOutputFilterByType DEFLATE application/x-javascript
  216. AddOutputFilterByType DEFLATE application/xml
  217. AddOutputFilterByType DEFLATE application/xhtml+xml
  218. AddOutputFilterByType DEFLATE application/font
  219. AddOutputFilterByType DEFLATE application/font-truetype
  220. AddOutputFilterByType DEFLATE application/font-ttf
  221. AddOutputFilterByType DEFLATE application/font-otf
  222. AddOutputFilterByType DEFLATE application/font-opentype
  223. AddOutputFilterByType DEFLATE application/font-woff
  224. AddOutputFilterByType DEFLATE application/font-woff2
  225. AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  226. AddOutputFilterByType DEFLATE font/ttf
  227. AddOutputFilterByType DEFLATE font/otf
  228. AddOutputFilterByType DEFLATE font/opentype
  229. AddOutputFilterByType DEFLATE font/woff
  230. AddOutputFilterByType DEFLATE font/woff2
  231. # For Olders Browsers Which Can't Handle Compression
  232. BrowserMatch ^Mozilla/4 gzip-only-text/html
  233. BrowserMatch ^Mozilla/4.0[678] no-gzip
  234. BrowserMatch bMSIE !no-gzip !gzip-only-text/html
  235. </IfModule>
  236. ## END EXPIRES CACHING - JCH OPTIMIZE ##
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement