webp-express
webp-express copied to clipboard
Generated htaccess's "RewriteCond: bad flag delimiters"
Hi,
I updated a local work in progress website, all plugins and core up to date. When generating new htaccess files from your plugin page all images & theme css etc all breaks.
Apache log displays: RewriteCond: bad flag delimiters After deleting the 3 htaccess files generated by your plugin the website works again.
PHP 7.4.16
If I check the wp-content/themes/.htaccess
or the wp-content/uploads/.htaccess
in a syntax checker for htaccess it gives an error on lines 58 and 59.
Which is this block:
# Avoid redirecting to webp files that are bigger than the original
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} (?i)(D:/Development/mywebsite.com/Website 2020/wp-content/themes/)(.*)(\.jpe?g|\.png)$
RewriteCond D:/Development/mywebsite.com/Website 2020/wp-content/webp-express/webp-images-bigger-than-source/themes/%2%3.webp -f
RewriteRule . - [L]
I assume there should be an url instead of a local path?
Actually, it is on purpose that it is a local path. I'm guessing that the problem is due to the space in a folder name. Perhaps all that is needed is some quotes around the paths