[問題] Apache 使用 mod_rewrite 但網址也跟著跑

看板Web_Design作者 (Myrmarachne)時間17年前 (2009/03/01 23:07), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
我的 .htaccess 如下: ### Options FollowSymLinks RewriteEngine On RewriteRule ^(.*)/index.html$ http://localhost/index.php?page=$1 [NC,L] ### 如此確實可以以 http://localhost/x/index.html (短網址) 得到 http://localhost/index.php?page=x (長網址) 但是每次在瀏覽器上輸入短網址, 網址列也就直接跳到長網址,並輸出長網址的內容了。 而我希望的是若輸入短網址,可以得到長網址的內容,但網址列仍顯示短網址。 請問我該往什麼方向或設定來檢查? Server version: Apache/1.3.41 (Darwin) -- http://apansharing.blogspot.com/ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.125.203.33
文章代碼(AID): #19ggIzVX (Web_Design)
文章代碼(AID): #19ggIzVX (Web_Design)