我寫了一些php代碼,它生成了像article.php?id=1
等頁面的URL。 很明顯,id是從數據庫中提取的文章的id。在同一個數據庫表中,我有id
,title
和category
列。 如:幫助mod_rewrite
id title category
1 hello world general
我的問題是,如何能在URL的使用條款,而不是ID的標題和分類我重寫。例如,我想重新寫URL
example.com/article.php?id=1
要:
example.com/general/hello-world
感謝。
難道你的意思是你想改寫ŧ他以其他方式? – 2011-05-22 20:04:32