我想知道如何使用mod rewrite将不具有尾部斜杠的第一级子文件夹重写为php文件。重写没有结尾斜杠的第一级子文件夹htaccess
例如
/test -> rewrites to file.php?id=test
/test/ -> trailing slash so it follows through as normal to /test/
/test/test -> second level sub folder so it follows through as normal to /test/test
/ -> homepage needs to follow through as usual to index.php
试图想一个规则,1号线要做到这一点的。对于上面的例子,测试只是一个例子,规则应该重写任何字符串。