This is the URL path I currently use:
/index.php?pid=211 I want to get the URL path as /index/211/title of the product How to do user friendly URLs in PHP?
And how to get the value of the "title"?
Regards,
In you html code you must write like this:
<a href='http://www.domain.com/index/211/title-goes-here'>url_text</a> and in the htaccess file adapt the following:
Options +SymLinksIfOwnerMatch RewriteEngine on RewriteRule ^([a-zA-Z-]+)$ index.php?action=$1 [NC,L] RewriteRule ^(member)-([0-9-]+)$ index.php?action=member&id=$2 [NC,L] RewriteRule ^([a-zA-Z-]+)/([a-zA-Z-]+)-([0-9-]+)$ index.php?action=$1&saction=$2&sid=$3 [NC,L] RewriteRule ^([a-zA-Z-]+)/([0-9-]+)$ index.php?action=$1&id=$2 [NC,L] RewriteRule ^([0-9-]+)/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/(.*).html$ index.php?action=details&id=$1&p1=$2&p2=$3&p3=$4 [NC,L]
mod_rewrite.