php variable page more seo friendly and user friendly -


i have website on users create profile generates php variable page ex: profile-detail?id=286, id's generated dynamical, ex:profile-detail?id=286, next registration profile-detail?id=287, , on ... there anyway generate url link more seo friendly ex: /username-location.

you may configure rewite rules in .htaccess this:

rewriteengine on rewritecond %{request_filename} -s [or] rewritecond %{request_filename} -l [or] rewritecond %{request_filename} -d rewriterule ^.*$ - [nc,l] rewriterule ^.*$ index.php [nc,l] 

in case, request server processed index.php (if static file same name not exists). , $_server['request_uri'] equal real request uri - parse , use logic.

for example, if send /user/registry request .htaccess

$_server['request_uri'] => '/user/registry' 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -