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
Post a Comment