I have to set a rule on my htaccess file that redirects me all the images ex: img_4324_r.jpg to img_4324_s.jpg
all images
I have to set a rule on my htaccess file that redirects me all the images ex: img_4324_r.jpg to img_4324_s.jpg
all images
fab2s
On
For your exact example:
RewriteRule ^img_([0-9]+)_r\.jpg$ img_$1_s.jpg [R=301,L,NC]
if you have several extension with the same pattern:
RewriteRule ^img_([0-9]+)_r\.(jpe?g|png|gif)$ img_$1_s.$2 [R=301,L,NC]
Only to jpg:
RewriteRule ^img_([0-9]+)_r\.(jpe?g|png|gif)$ img_$1_s.jpg [R=301,L,NC]
You can repeat for each patterns if you have others, just capture what you need and use it
You also may need to add this at the top of you .htaccess:
RewriteEngine On
RewriteBase /
Copyright © 2021 Jogjafile Inc.
Should work, not 100% sure what you're asking for though.