What is the rule to rewrite following url www.example.com/news/article.php?title=title-here&id=3 to www.example.com/news/title-here-3.htm Code (markup): Any help?
RewriteEngine On RewriteRule ^news/article.php?title=([a-z0-9_-]+)&id=([0-9]+)$ news/$1-$2 Code (markup): Try that!
Thanks Wrighty for your reply. I tried this but its not working Here is the dynamic url http://www.example.com/news/article.php?title=flip-has-little-chance-in-an-iphone-world&id=21 I need it like this http://www.example.com/news/flip-has-little-chance-in-an-iphone-world-21.htm Code (markup):
RewriteEngine On RewriteRule ^news/([a-z0-9_-]+)-([0-9]{2})$ news/article.php?title=$1&id=$2 Code (markup): Try that!