Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2019
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.43 KB | None | 0 0
  1. ErrorDocument 404 https://vasedomena.cz/404.html
  2. ErrorDocument 500 https://vasedomena.cz/500.html
  3.  
  4. RewriteEngine On
  5. RewriteBase /
  6.  
  7. RewriteCond %{ENV:HTTPS} !^.*on
  8. RewriteRule ^(.*)$ https://vasedomena.cz/$1 [R,L]
  9.  
  10. RewriteRule ^index\.html$ / [R=301,L]
  11. RewriteRule ^(.*)/index\.html$ /$1/ [R=301,L]
  12.  
  13. RewriteCond %{THE_REQUEST} /([^.]+)\.html [NC]
  14. RewriteRule ^ /%1 [NC,L,R]
  15.  
  16. RewriteCond %{REQUEST_FILENAME}.html -f
  17. RewriteRule ^ %{REQUEST_URI}.html [NC,L]
  18.  
  19.  
  20. # BEGIN Compress text files
  21. <ifModule mod_deflate.c>
  22. AddOutputFilterByType DEFLATE \
  23. text/html \
  24. text/xml \
  25. text/css \
  26. text/plain \
  27. image/svg+xml \
  28. application/xhtml+xml \
  29. application/xml \
  30. application/rdf+xml \
  31. application/rss+xml \
  32. application/atom+xml \
  33. text/javascript \
  34. text/ecmascript \
  35. application/javascript \
  36. application/x-javascript \
  37. application/ecmascript \
  38. application/json \
  39. application/x-font-ttf \
  40. application/x-font-otf \
  41. font/truetype \
  42. font/opentype \
  43. application/x-pointplus
  44. </ifModule>
  45. # END Compress text files
  46.  
  47. # BEGIN Expire headers
  48. <ifModule mod_expires.c>
  49. ExpiresActive On
  50. ExpiresDefault "access plus 2592000 seconds"
  51. ExpiresByType image/x-icon "access plus 2592000 seconds"
  52. ExpiresByType image/jpeg "access plus 2592000 seconds"
  53. ExpiresByType image/jpg "access plus 2592000 seconds"
  54. ExpiresByType image/png "access plus 2592000 seconds"
  55. ExpiresByType image/gif "access plus 2592000 seconds"
  56. ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
  57. ExpiresByType text/css "access plus 604800 seconds"
  58. ExpiresByType text/javascript "access plus 604800 seconds"
  59. ExpiresByType application/javascript "access plus 604800 seconds"
  60. ExpiresByType application/x-javascript "access plus 604800 seconds"
  61. ExpiresByType text/html "access plus 604800 seconds"
  62. ExpiresByType application/xhtml+xml "access plus 604800 seconds"
  63. </ifModule>
  64. # END Expire headers
  65.  
  66. # BEGIN Cache-Control Headers
  67. <ifModule mod_headers.c>
  68. <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
  69. Header set Cache-Control "public"
  70. </filesMatch>
  71. <filesMatch "\.(css)$">
  72. Header set Cache-Control "public"
  73. </filesMatch>
  74. <filesMatch "\.(js)$">
  75. Header set Cache-Control "private"
  76. </filesMatch>
  77. <filesMatch "\.(x?html?|php)$">
  78. Header set Cache-Control "private, max-age=360, must-revalidate"
  79. </filesMatch>
  80. </ifModule>
  81. # END Cache-Control Headers
  82.  
  83. # BEGIN Turn ETags Off
  84. Header unset Pragma
  85. FileETag None
  86. Header unset ETag
  87. # END Turn ETags Off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement