Blog Rewrite is almost perfect

I am using this for my blog url rewrite.

RewriteRule ^blog/([0-9]+)/.*$ /blog.php?post_id=$1 [L]

And that turns blog.php?post_id=3 into blog/3/title-seperated-by-dashes

The problem is that even if I just type blog/3/hokdohkd the link will still work! I only want the link working if the title is correct too.

Thanks… I now have it working properly.

You should assign id and title to variables and then check for post existence based on these.