更新时间:2022-04-09 00:35:04
这应该有效:
RewriteEngine On
RewriteRule \/([^\/]+)\/$ $1.php
它将为您提供以url的最后一段命名的文件:
It will serve you the file named after the last segment of the url:
http://example.com/shops/shopname1/ -> shopname1.php
http://example.com/shops/shopname1/ -> shopname1.php
http://example.com/shops/ -> shop.php
http://example.com/shops/ -> shops.php