質問
- Wpblogにおいて以下のようなgzip圧縮の為の.htaccessについて
-
本文:
いつもお世話になります。
ページの表示速度アップのために、
.htaccessとして以下のような記述をして、
使用しているthemeフォルダ内にFTPにてアップロードしようと思っています。
AddType image/x-icon .ico
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|ico)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI _\.utxt$ no-gzip
#DeflateCompressionLevel 4
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
</IfModule>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 216000 seconds"
</ifModule>
FileETag none
<FilesMatch "^(wp-config\.php|wp-mail\.php|install\.php|\.ht)">
order allow,deny
deny from all
</FilesMatch>
これは間違っていますでしょうか?
また、
WPblogにおいてやっても良いことなのでしょうか?
お忙しい中誠に恐れ入りますが、
何卒ご教授お願い申し上げます。
- 緊急度:緊急投稿者:universeさん投稿時間:2017/04/09 12:50
回答 No.5912
-
本文:
wpblogでは、mod_deflate は、使えなかったような...
https://secure.netowl.jp/bbs/detail.cgi?td=2235
https://secure.netowl.jp/bbs/detail.cgi?td=2491
mod_expires は使えた気がする。
- 投稿者:ジョバンニさん 投稿時間:2017/04/09 15:43
質問者からのコメント
ジョバンニ様。
ご回答ありがとうございます。
mod_deflateが使えなかったとしても、
記述しておくのは問題ないでしょうか?
回答 No.5913
この回答がベストアンサーです
同じ質問なら、同じ答え。
https://secure.netowl.jp/bbs/detail.cgi?td=2526
質問者からのコメント
ジョバンニ様、
ご回答ありがとうございます。
たしかに、
同じ質問でしたm(__)m。
申し訳ありませんでした。
ただ、
もう一度確認させて頂きたいのですが…。
Wpblogにおいては、
htaccessを記載しないほうが良いということでしょうか?
同じ質問となってしまい誠に申し訳ありませんが、
もし、
ご回答頂けるのでありましたらお願いいたしますm(__)m。m(._.*)m
本当にすみませんでした。