0
以下代碼在.htaccess中導致500內部服務器錯誤。 我已經嘗試更新到Apache 2.4的代碼,但似乎我在某個地方犯了一個錯誤。IfModule filter_module內部服務器錯誤Apache 2.2到2.4
請告知什麼錯與下面的代碼導致此錯誤:
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{Content-Type} = text/(html|css|javascript|plain|x(ml|-component))"
FilterProvider COMPRESS DEFLATE "%{Content-Type} = application/(javascript|json|xml|x-javascript)"
FilterChain COMPRESS
FilterProtocol COMPRESS change=yes;byteranges=no
</IfModule>
嘗試這個代碼,以及和它沒有工作:
<IfVersion >= 2.4>
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE "%{Content-Type} =~ 'text/(html|css|javascript|plain|x(ml|-component))'"
FilterProvider COMPRESS DEFLATE "%{Content-Type} =~ 'application/(javascript|json|xml|x-javascript)'"
FilterChain COMPRESS
FilterProtocol COMPRESS change=yes;byteranges=no
</IfModule>
</IfVersion>
<IfVersion <= 2.2>
<IfModule filter_module>
FilterDeclare COMPRESS
FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
FilterChain COMPRESS
FilterProtocol COMPRESS change=yes;byteranges=no
</IfModule>
</IfVersion>
檢驗這兩條線都是經過導致500內部服務器錯誤:
任何幫助將不勝感激!
謝謝。 :)