Mar 12

blog的url rewrite靜態化小毛病已經解決 雨

lilujun , March 12, 2007 14:51 (GMT+08:00) , 站點公告 , 評論(0) , 引用(0) , 閱讀(1881) , Via 本站原創 | |
原先規則是
RewriteRule ^(.*)/index_([0-9]+)_([0-9]+).htm$ $1/index.php\?mode=$2&page=3

剛才再仔細檢查時,發現當時是輸入錯誤,少了$和\
正確應該為
RewriteRule ^(.*)/index_([0-9]+)_([0-9]+).htm$ $1/index\.php\?mode=$2&page=$3

現url rewrite靜態化已全部測試成功.

沒有進行任何url優化的形式:
blog.lilujun.com/read.php?23
blog.lilujun.com/index.php?mode=1&page=2
blog.lilujun.com/index.php?go=category_3

使用PHP自身url優化形式:
blog.lilujun.com/read.php/23.htm
(下面兩項沒進行優化)
blog.lilujun.com/index.php?mode=1&page=2
blog.lilujun.com/index.php?go=category_3

現在使用IIS的url rewrite優化形式:
blog.lilujun.com/post/23.htm
blog.lilujun.com/index_1_2.htm
blog.lilujun.com/category_3.htm
發表評論
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
開啟HTML
開啟UBB
開啟表情
隱藏
記住我
暱稱   密碼   訪客無需密碼
網址   電郵   [註冊]