How do i mod rewrite something so that it shows how-to-make-this.html I mean, for example if I have page.php?article=5 how do I do it supposing title of article is How to Make This and is stored under var $title? thanks
RewriteRule ([0-9]+)-([a-z0-9-_]+)\.html page.php?article=$1 will rewrite 5-how-to-make-this.html to page.php?article=5. You can do it without including the ID in the URL but it complicates things with little to no benefits. You'd have to alter your script to ensure each page has a unique title and strip out or replace symbols before creating the link, then attempt to rebuild the original title when determining which page to show. Since this way will accept any requested URL in the format number-anything.html and rewrite to page.php?article=number, you need to ensure you always use the same link to the page - otherwise 5-i-like-pie.html will show the same as 5-donkeys.html and you may be penalized for duplicate content.