Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. ### BOOST START ###
  2. AddDefaultCharset utf-8
  3. FileETag None
  4. <FilesMatch "(.html)$">
  5. <IfModule mod_headers.c>
  6. Header set Expires "Sun, 19 Nov 1978 05:00:00 GMT"
  7. Header set Cache-Control "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
  8. </IfModule>
  9. </FilesMatch>
  10. <IfModule mod_mime.c>
  11. AddCharset utf-8 .html
  12. AddCharset utf-8 .css
  13. AddCharset utf-8 .js
  14. </IfModule>
  15. <FilesMatch "(.html)$">
  16. ForceType text/html
  17. </FilesMatch>
  18. <FilesMatch "(.js)$">
  19. ForceType text/javascript
  20. </FilesMatch>
  21. <FilesMatch "(.css)$">
  22. ForceType text/css
  23. </FilesMatch>
  24.  
  25. # NORMAL - Cached css & js files
  26. RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.css -s
  27. RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.css [L,QSA,T=text/css]
  28. RewriteCond %{DOCUMENT_ROOT}/cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.js -s
  29. RewriteRule .* cache/perm/%{SERVER_NAME}%{REQUEST_URI}_.js [L,QSA,T=text/javascript]
  30.  
  31. # Caching for anonymous users
  32. # Skip boost IF not get request OR uri has wrong dir OR cookie is set OR request came from this server OR https request
  33. RewriteCond %{REQUEST_METHOD} !^(GET|HEAD)$ [OR]
  34. RewriteCond %{REQUEST_URI} (^/(admin|cache|misc|modules|sites|system|openid|themes|node/add))|(/(comment/reply|edit|user|user/(login|password|register))$) [OR]
  35. RewriteCond %{HTTP_COOKIE} DRUPAL_UID [OR]
  36. RewriteCond %{HTTP:Pragma} no-cache [OR]
  37. RewriteCond %{HTTP:Cache-Control} no-cache [OR]
  38. RewriteCond %{HTTPS} on
  39. RewriteRule .* - [S=1]
  40.  
  41. # NORMAL
  42. RewriteCond %{DOCUMENT_ROOT}/cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}.html -s
  43. RewriteRule .* cache/normal/%{SERVER_NAME}%{REQUEST_URI}_%{QUERY_STRING}.html [L,T=text/html]
  44.  
  45. ### BOOST END ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement