.htaccess URL重写仅重新写入一页

.htaccess URL重写仅重新写入一页,.htaccess,url,redirect,.htaccess,Url,Redirect,我正在重新创建一个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] 在浏览

我正在重新创建一个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