使用htaccess更改带参数的索引URL



我希望我的URL索引在末尾使用或不使用参数:

mysite.com需要与mysite.com/test完全相同

因为我需要使用get获取test变量。但无论是否使用此参数,站点都需要表现得相同。我尝试:

RewriteRule (.*) index.php?var=$1

但它破坏了到exters文件(css、jquery等(的链接

我得到的是这样的:

RewriteRule ^test/(.*) index.php?var=$1

最新更新