Apache2:重写规则没有显示在地址栏中?

我有一个域,example.com。

这是我的apache2 ReWrite规则:

RewriteEngine on RewriteRule ^([^/.]+)/?$ index.php?uname=$1 [L] 

当我访问http://example.com/Eamorr时 , http://example.com/Eamorr出现在浏览器的地址栏中。

我希望http://www.example.com/index.php?uname=Eamorr出现在地址栏中! (我的JavaScript需要parsingGET参数)

这可能吗?

提前谢谢了,

将redirect添加到该RewriteRule 。 将[L]更改为[R,L]

这将启动一个redirect循环,但。 您可能想要将其更改为不匹配index.php