Reputation: 1053
my image real url is http://www.example.com/images/201712/2j80owr1sgg0co00k0.jpg
but I want to show image url as http://www.example.com/images/201712/this-is-an-image-2j80owr1sgg0co00k0.jpg
I tried a lot of combinations but they did not work. Because I need last 1 part of url seperated by (-)
Thanks for help
Upvotes: 0
Views: 79
Reputation: 18671
You can use:
RewriteEngine on
RewriteRule ^(images/\d+/)[^/]+-(.+\.jpg)$ $1$2 [NC,L]
Upvotes: 1