Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.80 KB | None | 0 0
  1. keep getting: The stylesheet http://127.0.0.1/inc/style/21.cssz was not loaded because its MIME type, "“text/css", is not "text/css".
  2.  
  3. .htaccess file:
  4.  
  5. Options +Indexes
  6. Options +SymLinksIfOwnerMatch
  7. AddType text/javascript .js
  8. AddType text/x-javascript .js.gz
  9. AddType text/css .css
  10. AddType text/x-css .css.gz
  11. AddType video/ogg .ogm
  12. AddType video/ogg .ogv
  13. AddType video/ogg .ogg
  14. AddType video/mp4 .mp4
  15. AddType video/webm .webm
  16. AddType audio/mpeg mpga mp2 mp2a mp3 m2a m3a
  17. AddType audio/ogg oga ogg spx
  18. AddType audio/mp4 mp4a
  19. AddType audio/playlist m3u M3U
  20. AddType “text/javascript;charset=UTF-8″ .jgz
  21. AddEncoding gzip .jgz
  22. AddType “text/css;charset=UTF-8″ .cssz
  23. AddEncoding gzip .cssz
  24.  
  25. <IfModule mod_rewrite.c>
  26. RewriteEngine On
  27. #Serve gzip compressed CSS files if they exist and the client accepts gzip.
  28. RewriteCond %{HTTP:Accept-encoding} gzip
  29. RewriteCond %{REQUEST_FILENAME}\.gz -s
  30. RewriteRule ^(.*)\.css $1\.cssz [QSA]
  31.  
  32. # Serve correct content types, and prevent mod_deflate double gzip.
  33. RewriteRule \.cssz$ - [T=text/css,E=no-gzip:1]
  34. </IfModule>
  35. <IfModule mod_deflate.c>
  36. AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml
  37. BrowserMatch ^Mozilla/4 gzip-only-text/html
  38. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  39. BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  40. </IfModule>
  41. RewriteRule ^test\.html http://www.bb.com/? [R=301,L]
  42. <IfModule mod_headers.c>
  43. <FilesMatch "\.(js|css|xml|gz)$">
  44. Header append Vary: Accept-Encoding
  45. </FilesMatch>
  46. Header set Connection keep-alive
  47. <FilesMatch "\.html\.gz$">
  48. ForceType text/html
  49. Header set Content-Encoding: gzip
  50. </FilesMatch>
  51.  
  52. <FilesMatch "\.js\.gz$">
  53. AddType text/javascript .js.gz
  54. AddEncoding gzip .gz
  55. ForceType text/javascript
  56. Header set Content-Encoding gzip env=FORCE_GZIP
  57. </FilesMatch>
  58.  
  59. <FilesMatch "\.css\.gz$">
  60. ForceType text/css
  61. AddType text/css .js.gz
  62. AddEncoding gzip .gz
  63. Header set Content-Encoding gzip env=FORCE_GZIP
  64. </FilesMatch>
  65.  
  66. <FilesMatch "\.cssz$">
  67. AddEncoding gzip .gz
  68. Header set Content-Encoding gzip env=FORCE_GZIP
  69. </FilesMatch>
  70.  
  71. </IfModule>
  72. <IfModule mod_rewrite.c>
  73. #RewriteRule .? - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  74. #RewriteRule .? - [E=Authorization:%{HTTP:Authorization}]
  75. #ReWriteCond %{HTTP:accept-encoding} gzip
  76. #ReWriteCond %{REQUEST_FILENAME} !\.gz$
  77. #RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.gz -f
  78. #RewriteRule ^(.+\.js|.+\.css|.+\.html)$ $1.gz [L]
  79. #RewriteCond %{HTTPS} on
  80. #RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
  81. #
  82. #RewriteCond %{HTTP:Accept-encoding} gzip
  83. #RewriteCond %{REQUEST_FILENAME}\.gz -s
  84. #RewriteRule ^(.*)\.(html|css|js|data) $1\.$2\.gz [QSA]
  85.  
  86. # Prevent double gzip and give the correct mime-type
  87. #RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1,E=FORCE_GZIP]
  88. #RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1,E=FORCE_GZIP]
  89. #RewriteRule \.html\.gz$ - [T=text/html,E=no-gzip:1,E=FORCE_GZIP]
  90. #RewriteRule \.data\.gz$ - [T=text/plain,E=no-gzip:1,E=FORCE_GZIP]
  91.  
  92.  
  93. </IfModule>
  94.  
  95. <IfModule mod_expires.c>
  96. ExpiresActive On
  97. ExpiresDefault "access plus 1 month"
  98. ExpiresByType text/css "access plus 1 month"
  99. ExpiresByType text/x-css "access plus 1 month"
  100. ExpiresByType text/x-javascript "access plus 1 month"
  101. ExpiresByType application/x-javascript "access plus 1 month"
  102. ExpiresByType application/x-gzip "access plus 1 month"
  103. ExpiresByType application/js "access plus 1 month"
  104. ExpiresByType application/javascript "access plus 1 month"
  105. ExpiresByType application/x-icon "access plus 1 year"
  106. ExpiresByType image/gif A2592000
  107. ExpiresByType image/png A2592000
  108. ExpiresByType image/jpg A2592000
  109. ExpiresByType image/jpeg A2592000
  110. ExpiresByType image/ico A2592000
  111. </IfModule>
  112. <IfModule mod_headers.c>
  113. Header set Cache-Control "max-age=1728000, public, must-revalidate"
  114. </IfModule>
  115.  
  116. <Files 403.shtml>
  117. order allow,deny
  118. allow from all
  119. </Files>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement