• Resolved zoohomi

    (@zoohomi)


    レンタルサーバー:xserver X10プラン
    CMS:Wordpress

    EWWW Iage Optimizerを使用して、jpgやpngをWebPに変換しようとしています。
    設定画面からリライトルールを挿入すると、.htaccessに以下のコードが追記されました。

    # BEGIN EWWWIO
    # "BEGIN EWWWIO" から "END EWWWIO" までのディレクティブ (行) は
    # 動的に生成され、WordPress フィルターによってのみ修正が可能です。
    # これらのマーカー間にあるディレクティブへのいかなる変更も上書きされてしまいます。
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_ACCEPT} image/webp
    RewriteCond %{REQUEST_FILENAME} (.*)\.(jpe?g|png|gif)$
    RewriteCond %{REQUEST_FILENAME}.webp -f
    RewriteCond %{QUERY_STRING} !type=original
    RewriteRule (.+)\.(jpe?g|png|gif)$ %{REQUEST_URI}.webp [T=image/webp,L]
    </IfModule>
    <IfModule mod_headers.c>
    <FilesMatch "\.(jpe?g|png|gif)$">
    Header append Vary Accept
    </FilesMatch>
    </IfModule>
    AddType image/webp .webp
    # END EWWWIO

    他のサイトに導入したときはこれでうまくいったのですが、
    当該サイトでは、以下のように警告が表示され、うまくいきません。

    このサイトには mod_headers が抜けているようです。この Apache モジュールを有効化するよう、ホスティング会社やシステム管理者にご連絡ください。
    This may be a false positive. If so, the warning should go away once you implement the rewrite rules.
    
    WebP rules verified, but self-test failed: WebP response received status 401
    .htaccessは上記の通り反映されているようなのですが、
    なぜ動作しないのかわかりません??。
    
    どなたかご教授くださいませ。
    よろしくお願いいたします。
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    As noted, the mod_headers alert could be a false-positive, but the only way to know is to test it and see.
    Unfortunately, your server is blocking itself from requesting images, so the automatic self-test gets a 401 error code instead of a valid response.
    You can either try to fix that, or just post a link to your site, and we’ll see if we can validate the test URL manually.

    I’ve just had this after switching from another WebP converter plugin to EWWW IO. The other plugin added .htaccess files in wp-content and wp-content/uploads, which were overriding the one in the root directory.

    So look for .htaccess files with WebP-related rules and remove the rules (or the whole file, if there’s nothing else in it).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘EWWW Image OptimizerのWebP変換がうまくいかない’ is closed to new replies.