php - Using mod_rewrite for user pages -


so now, when use search function search user , go page, this. "http://www.mywebsite.com/profile/?pid=username"

the php on page gets variable, , runs query of information needed.

i love rid of ?pid= part , have "http://www.mywebsite.com/profile/username"

but having trouble understanding of results google on specific url. examples involve php files, i'm using wordpress , embedding php via execphp.

this should work in .htaccess file:

rewriteengine on rewriterule ^/profile/([^/]*)$ /profile/?pid=$1 [l] 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

c# - Exception when attempting to modify Dictionary -