• Hello,
    I was going through the wp-content/.htaccess file rules generated by the plugin and correct me if I’m wrong, but wouldn’t the following code

    
      # WebP Realizer: Redirect non-existing webp images to webp-realizer.php, which will locate corresponding jpg/png, convert it, and deliver the webp (if possible) 
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^/?(.+)\.(webp)$ /wp-content/plugins/webp-express/wod/webp-realizer.php [E=DESTINATIONREL:wp-content/$0,E=WPCONTENT:wp-content,NC,L]
    

    also match non jpg/png files?

    Kind regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter panaceaoutfits

    (@panaceaoutfits)

    Hello @rosell.dk
    It has been almost 2 months. Any chance you can have a look at this?
    I think this rule overrides other .htaccess rules for missing files (!-f) in subfolders.

    Cheers!

    Plugin Author rosell.dk

    (@roselldk)

    Ok, sorry for not answering. I have been a bit occupied lately…

    Well, the rule does not match jpegs or pngs. It matches webp files. And only webp files.

    As the comment says: “Redirect non-existing webp images to webp-realizer.php, which will locate corresponding jpg/png, convert it, and deliver the webp (if possible)”

    The \.(webp)$ part of the rule says that it must end with “.webp”

    Thread Starter panaceaoutfits

    (@panaceaoutfits)

    The RewriteCond directive defines a rule condition. One or more RewriteCond can precede a RewriteRule directive. The following rule is then only used if both the current state of the URI matches its pattern, and if these conditions are met.

    Yeah, @roselldk thanks for the reply. I first thought the RewriteCond matches other files, but it indeed should only work with .webp
    Thank you for a great plugin and good luck ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘.htaccess configuration for missing images’ is closed to new replies.