使用htaccess,如何将“www.mysite.com/page.php?get=myname”设置为“www.mysite.com/myname”? [关闭]

I have a page "page.php" on my site "www.mysite.com". "page.php" is a profile page for users on my website. Users profile can be accessed like this: "http://www.mysite.com/page.php?user=rehan". Using htaccess, I would like to rewrite the link to: "http://www.mysite.com/rehan". How can I achieve this?

Thanks in advance, Rehan.

You can try this

RewriteEngine on
RewriteBase /
RewriteRule ^([^//]+)$ page.php?user=$1 [QSA,L]

for that you have to use :

`

RewriteEngine on

RewriteRule ^([^//]+)$ page.php?user=$1 [QSA,L]`

but on some servers you have to add :

RewriteBase /