问题
I try to change over htaccess from
http://www.mydomain.com/pictures/generated/product/1/280_280_75/nopic.jpg
to
http://www.mydomain.com/pictures/generated/product/1/280_280_75/nopic1.jpg
Here is my rules
RewriteCond %{HTTP_HOST} ^mydomain\.com
RewriteRule nopic\.jpg$ nopic1\.jpg
It works in some way;) The whole URL will be changed just to "nopic1.jpg".
The question is: How can I change only the last part of URL?
回答1:
This should work:
RewriteRule ^(.*)nopic\.jpg$ $1nopic1\.jpg
来源:https://stackoverflow.com/questions/10106561/htaccess-rewrite-rule-for-a-part-of-url