W3 Total Cacheの管理画面でエラーがでる


W3 Total Cacheの管理画面で以下のようなエラーが出てしまいました

It appears Page Cache URL rewriting is not working. If using apache, verify that the server configuration allows .htaccess or if using nginx verify all configuration files are included in the configuration.

まず以下のファイルのパーミッションを644変更する
/wp-content/w3tc-ドメイン名/min/.htaccess
/wp-content/w3tc-ドメイン名/pgcache/.htaccess

それでもダメな場合は
/.htaccess
を確認。

# BEGIN W3TC Browser Cache


BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html


Header append Vary User-Agent env=!dont-vary


AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon



FileETag None

Header set X-Powered-By “W3 Total Cache/0.9.2.5”



FileETag None

Header set X-Powered-By “W3 Total Cache/0.9.2.5”



FileETag None

Header set X-Powered-By “W3 Total Cache/0.9.2.5”


# END W3TC Browser Cache
# BEGIN W3TC Page Cache core

RewriteEngine On
RewriteBase /
RewriteRule ^(.*\/)?w3tc_rewrite_test$ $1?w3tc_rewrite_test=1 [L]
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9\-\.]+\.[a-z]+)\.?(:[0-9]+)?$
RewriteRule .* – [E=W3TC_DOMAIN:%2]
RewriteCond %{REQUEST_URI} ^/(niconama|note|deep)/
RewriteRule .* – [E=W3TC_BLOGNAME:%1.]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteRule .* – [E=W3TC_ENC:_gzip]
RewriteCond %{REQUEST_METHOD} !=POST
RewriteCond %{QUERY_STRING} =””
RewriteCond %{HTTP_HOST} =net-vacation.com
RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|\/feed\/|wp-.*\.php|index\.php) [NC,OR]
RewriteCond %{REQUEST_URI} (wp-comments-popup\.php|wp-links-opml\.php|wp-locations\.php) [NC]
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in) [NC]
RewriteCond %{HTTP_USER_AGENT} !(W3\ Total\ Cache/0\.9\.2\.5) [NC]
RewriteCond “%{DOCUMENT_ROOT}/wp-content/w3tc-%{ENV:W3TC_BLOGNAME}%{ENV:W3TC_DOMAIN}/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}” -f
RewriteRule .* “/wp-content/w3tc-%{ENV:W3TC_BLOGNAME}%{ENV:W3TC_DOMAIN}/pgcache/%{REQUEST_URI}/_index%{ENV:W3TC_UA}%{ENV:W3TC_REF}%{ENV:W3TC_SSL}.html%{ENV:W3TC_ENC}” [L]

# END W3TC Page Cache core

# BEGIN W3TC Browser Cacheから# END W3TC Page Cache coreみたいな記述があるので、それをwordpressの元からある.htaccessの記述よりも上に持ってきて上書きします。

こんなかんじでエラーが消えました。

参考

W3 Total Cache : Page Cache URL Rewriting Is Not Working
http://www.mkyong.com/blog/w3-total-cache-page-cache-url-rewriting-is-not-working/


コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です