如何在php mysql博客系统中创建搜索引擎友好的URL? [重复]

This question already has an answer here:

I have a website in which there is a standard blog template page and the content is fetched via post method from a "MYSQL Database". My "URLs" look like mysite.com/blog.php?id=2. What i want is too make them look like www.mysite.com/the-title-of-the-blog.

I have tried Google, but it has not helped me. what most articles miss is that they do not mention how to tell the server to identify the changed "URL". Please help me do so.

What i expect:

  1. probably a php function to convert it
  2. a .htaccess code to tell this to my server

Thanks in advance!

</div>

You'll be wanting to use the mod_rewrite web server extension. You'll find that frameworks like WordPress and Joomla! contain good examples of this.