i have link example http://localhost/somepage.php?id=1. , want make link http://localhost/somepage/1 not on somepage.php pages on localhost. here code hidding .php extension , got http://localhost/somepage?id=1 , need http://localhost/somepage/1.
rewriteengine on rewritecond %{request_filename} !-f rewriterule ^([^\.]+)$ $1.php [nc,l]
you can replace rule rule:
rewriteengine on rewriterule ^([^/]+)/(\d+)/?$ $1.php?id=$1 [qsa,l]
Comments
Post a Comment