pretty urls from database
问题 I am trying get pretty urls on my site..right now they look like this: www.site.com/tag.php?id=1 I want to change that to www.site.com/tag/1/slug my database table has ID,Title,Info,Slug I read online about slugs,but being new to php found no luck,can anyone help me with this. 回答1: First create an .htaccess file with the following: # Turn on rewrite engine and redirect broken requests to index <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST