plan2net / webp

Create a WebP copy for images (TYPO3 CMS)
GNU General Public License v3.0
60 stars 33 forks source link

Rewrite Rule not working for Apache #91

Open SventB opened 7 months ago

SventB commented 7 months ago

I am getting a 403 Forbidden with the Apache RewriteRule from README in my local DEV environment (it's Windows ;))

It's because of line

RewriteRule ^ %{REQUEST_FILENAME}\.webp [L,T=image/webp]

Apache log says:

[Wed Jan 31 19:13:19.301038 2024] [core:error] [pid 21260:tid 1220] (20023)The given path was above the root path: [client 127.0.0.1:54984] AH00127: Cannot map GET /fileadmin/_processed_/f/c/myfile_d239cc56df.png HTTP/1.1 to file

It's working with this rule:

RewriteRule ^(.*)$ $1\.webp [L,T=image/webp]