【发布时间】:2018-06-07 09:41:58
【问题描述】:
我有很多以 -xxx 结尾的 URL,其中 xxx 是 000 到 999 之间的数字。 例如:
http://a.com/imagea-000
http://a.com/category1/imageb-002
http://a.com/category1/category2/imagec-999
如何在 .httaccess 中指定 RewriteCond/RewriteRule 以删除数字,包括 url 末尾的“-”?所以最终的 URLS 看起来像:
http://a.com/imagea
http://a.com/category1/imageb
http://a.com/category1/category2/imagec
【问题讨论】:
标签: regex apache .htaccess mod-rewrite redirect