php - htaccess rewrite rule not working correctly -


i have following htaccess file

options +followsymlinks  rewriteengine on  #profile view rewriterule ^([a-za-z0-9.]+)/?$ profile.php?id=$1 

when go url , type http://www.mysite.com/username

then in profile.php file have

<?php     print_r($_get);     die(); ?> 

and prints out

array ( [id] => profile.php ) 

where should have printed out

array ( [id] => "username" ) 

so guess there wrong in rewrite rule?

just add qsa @ end:

rewriterule ^([a-za-z0-9.]+)/?$ profile.php?id=$1 [qsa] 

Comments