Apache2 URL rewrite with Query string

Apache2 URL rewrite with Query string

am 01.07.2007 18:10:53 von lihao0129

Hi, there:

I am setting a rewrite rule which can transfer URLs like:

http://mysite.com/?hello

to

http://mysite.com/lib/doc/hello.html

Now i am using the following RewriteCond and RewriteRule:

RewriteEngine on
RewriteCond %{QUERY_STRING} !^$
RewriteRule ^/$ /lib/doc/%
{QUERY_STRING}.html? [R,L]

It worked but the result is an external redirection, the URL displayed
in my browser becomes the redirected url.. I am hoping to do an
internal redirection which I hope the third line becomes:

RewriteRule ^/$ /lib/doc/%
{QUERY_STRING}.html? [L]

But this is not working? Can someone give me any suggestion how to fix
this problem? I am using: Apache/2.0.55, Ubuntu 6.06.

Thank you very much.

Lihao