0

我正在重写一个 URL 以指向引擎盖下的另一个 URL。但似乎 index.php 引用的不同目录中的所有其他文件(例如 css 文件、JS 文件等)都没有被重定向。我怎样才能做到这一点?

我有

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/test($|/)
RewriteRule .*$ ../index.php?orgid=4 [L]
4

1 回答 1

1

我发现答案是

RewriteRule ^(test)(.*)/?$ index.php?orgid=4 [L]

在浏览器中,这将显示为 example.com/test,而在后台,url 实际上是 example.com/index.php?orgid=4

于 2013-08-02T18:34:53.503 回答