When search engine visits the dynamic url site i.e http://sumitbansal.com/category.php?p=10, so it does not gives the more importance to this page because it keeps on chainging. So we convert the dynamic URL to static URL like:
http://sumitbansal.com/category.php?p=10 => http://sumitbansal.com/category/this–is-converting-url/
Example to make URL SEO friendly:
First of all on the RewriteEngine
RewriteEngine On
Write a rule to Rewrite URL
RewriteRule ^category/([^/]*)/(
[A-Za-z0-9-]+
)/$ category.php?id=$1&title=$2 [L]
This example will make this url ( category.php?id=1&title=2 ) to category/1/this-is-rewrite-url/
Explain:
^: pattern should match from the beginning of the string
(: start of subpattern
[^/]: write anything
*: one or more times
): end of subpattern
(: start of subpattern
[A-Za-z0-9-]: class of characters
+: one or more times
): end of subpattern
/: foward slash…
?: can occur zero or once
$: end of string
thanks dude.. awesome article