image - Htaccess rewrite if filename contains specific suffix -


i'd rewrite every image (png|webp|jpeg) name filename-tn.xyz filename-200x200.xyz. how replace variable without changing rest of url?

thanks in advance.

this should work. should rename png, jpeg , webp

rewriteengine on rewriterule ^(.*)-tn\.(png|jpeg|webp)$    /$1-200x200.$2 [r,l] 

edit: rename image, keep old name in url bar.

rewriteengine on rewriterule ^(.*)-tn\.(png|jpeg|webp)$    /$1-200x200.$2 [l] 

Comments

Popular posts from this blog

c# - Unity IoC Lifetime per HttpRequest for UserStore -

Change the color of an oval at click in Java AWT -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -