Advertisement
Fany_VanDaal

Přepis htaccess+gzip

Nov 14th, 2020
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #ignored: "-" thing used or unknown variable in regex/rew
  2. if (!-f $request_filename){
  3. set $rule_1 1$rule_1;
  4. }
  5. if (!-d $request_filename){
  6. set $rule_1 2$rule_1;
  7. }
  8. if ($rule_1 = "21"){
  9. rewrite /. /index.php last;
  10. }
  11. gzip on;
  12. gzip_disable "MSIE [1-6]\\.(?!.*SV1)";
  13. gzip_proxied any;
  14. gzip_comp_level 5;
  15. gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/rss+xml text/javascript image/x-icon image/bmp image/svg+xml;
  16. gzip_vary on;
  17.  
  18. location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf|svg)$ {
  19. expires 7d;
  20. add_header Cache-Control "public, no-transform";
  21. }
  22.  
  23. location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf|svg)$ {
  24. expires 7d;
  25. }
  26. location ~* \.(pdf|html|swf)$ {
  27. expires 7d;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement