[問題] Apache設定中正斜線"/"的用法

看板Linux作者 (Kyosuka)時間13年前 (2012/12/06 09:30), 編輯推噓1(101)
留言2則, 1人參與, 最新討論串1/1
請問大家, 在Apache設定中, 加"/"或不加"/"有什麼區別呢? 說明文件中有的有加有的又沒加, 有加沒有加很多時候又都不太一樣, 大困擾中... 例如:1.<Directory /example>跟<Directory /example/>? 2.網址列中打http://foo.com/example or http://foo.com/example/ 如果我希望使用者在2.網址中不論是有加"/"都能正確連至http://foo.com/example/ 那請問應如何設定呢? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.242.212.38

12/07 08:37, , 1F
你可以看一下apache log 檔 / 會造成錯誤的狀況
12/07 08:37, 1F

12/07 08:37, , 2F
不然你就用 mod_write 轉換網址
12/07 08:37, 2F
文章代碼(AID): #1Gl_KpUq (Linux)
文章代碼(AID): #1Gl_KpUq (Linux)