目前,我有系統,該系統通過htaccess的工作原理是需要骨灰級的URL每次新產品添加到系統中,類似下面htacces網址重寫條件改寫
RewriteRule ^18th-and-19th-century$ sub_category.php?id=18th-and-19th-century
RewriteRule ^20th-century-furniture$ product.php?id=20th-century-furniture
RewriteRule ^pair-lacquer-cabints$ product_info.php?id=pair-lacquer-cabints
,也有幾個靜態頁面如,
RewriteRule aboutus aboutus.php?
RewriteRule contactus contactus.php?
這裏的想法,我想是重定向產品信息,分類信息在一定的index.php和訪問,因爲它們是靜態頁面,
RewriteRule aboutus$ aboutus.php?
RewriteRule contactus contactus.php?
RewriteRule^index.php?
我試過,但每次花費我太多的index.php頁面,我認爲需要有一些條件的東西在這裏,但無法理解如何前進
由於提前
那麼,你嘗試這麼遠嗎? – progsource
RewriteRule aboutus $ aboutus.php? RewriteRule contactus contactus.php? RewriteRule^index.php? @progsource –