Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将每个 URI 重写为 index.php?
RewriteRule . index.php
这只会重写当前目录中的文件,因此 example.org/folder 不会重写。
如果该规则位于文档根目录中的 htaccess 文件中,那么它将重定向所有内容。而不是.,它应该是.*:
.
.*
RewriteEngine On RewriteRule .* index.php