2021年1月20日星期三

Htaccess rewrite / redirect issue from .png.webp back to png

Can any experts in .htaccess tell me why this isn't working? (it's the last line that is key - the .png.webp to png rewrite) Please help!

RewriteEngine On  RewriteBase /  RewriteRule ^index\.php$ - [L]  RewriteCond %{REQUEST_FILENAME} !-f  RewriteCond %{REQUEST_FILENAME} !-d  RewriteRule . /index.php [L]    RewriteCond %{HTTP_HOST} ^www.test.com [NC]  RewriteRule ^(.*)$ https://test.com/$1 [L,R=301]  RewriteRule ^(.*)\.webp.png$ $1.png [L,R=301]  

Example issue:

https://centiqsap.com/wp-content/uploads-webpc/uploads/2020/07/Group-13-min-2.png.webp

Needs to rewrite and redirect to

https://centiqsap.com/wp-content/uploads-webpc/uploads/2020/07/Group-13-min-2.png

https://stackoverflow.com/questions/65816629/htaccess-rewrite-redirect-issue-from-png-webp-back-to-png January 21, 2021 at 03:50AM

没有评论:

发表评论