我可以在.htaccess文件中使用嵌套if

时间:2012-05-09 05:13:11

标签: .htaccess

我在htaccess文件中使用以下代码。 (如果模块嵌套)没问题或会产生任何问题。 (任何专家对此都有看法)

# Enable the client to receive both gzip-encoded content and a plain content.
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

<IfModule mod_setenvif.c>
#The following lines are to avoid bugs with some browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 
</IfModule>

</IfModule>

提前谢谢

问候,莫娜

0 个答案:

没有答案