I have a php file, say xyz.php I pass a parameter to it saying id=xZeirE3s (which is variable) http://www.example.com/xyz.php?id=xZeirE3s Code (markup): Now i want to rewrite url in such a manner that when i enter a url like http://www.example.com/dynamic-title-of-page-xZeirE3s.html Code (markup): Then it just reads that end part i.e. xZeirE3s and opens the page http://www.example.com/xyz.php?id=xZeirE3s Code (markup): I know it wont be that difficult, but i'm really bad at making regular expressions and .htaccess files Thanks in advance.
RewriteEngine on RewriteRule ^([A-Za-z0-9_-]+)-([A-Za-z0-9_-]+).html$ xyz.php?title=$1&id=$2 [NC] Code (markup): Haven't tested it, but hope this helps.