php - .htaccess url rewrite remove id -
is possible .htaccess remove parameter id of url & show text. have url like
current url
http://localhost/profile.php?profileid=4554   rewrited .htaccess
http://localhost/profileid-4554/my username   needed url
http://localhost/profileid/my username   in above url, want remove id 4554. .htaccess
rewriteengine on rewritecond %{request_filename}\.php -f rewriterule ^(.*)$ $1.php  rewriterule ^profileid-([0-9]+) profile?profileid=$1   is possible that?
you ask http://localhost/profileid-4554/my username. don't understand take my username. rest can done next
rewriteengine on rewritecond %{query_string} profileid=([^&]+) rewriterule profile.php /profileid-%1 [l,r]      
Comments
Post a Comment