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.
我正在重写一个 URL 以指向引擎盖下的另一个 URL。但似乎 index.php 引用的不同目录中的所有其他文件(例如 css 文件、JS 文件等)都没有被重定向。我怎样才能做到这一点?
我有
RewriteEngine On RewriteCond %{REQUEST_URI} ^/test($|/) RewriteRule .*$ ../index.php?orgid=4 [L]
我发现答案是
RewriteRule ^(test)(.*)/?$ index.php?orgid=4 [L]
在浏览器中,这将显示为 example.com/test,而在后台,url 实际上是 example.com/index.php?orgid=4