2016-10-12 27 views
0

我試圖通過使用下面的設置配置Apache webserver httpd.conf來將所有index.html重定向到根文件夾。它能夠成功重定向,但它始終指向testsite.com //而不是testsite.com/。任何想法爲什麼它保持轉發到URL與2斜線'/'?感謝您的建議,謝謝!使用httpd.conf將index.html重定向到根目錄

RewriteEngine On 
RewriteRule ^index\.html$/[R=301,L] 
RewriteRule ^(.*)/index\.html$ $1 [R=301,L] 
+0

任何人都可以幫助嗎?謝謝。 – Ryan

+0

沒有人知道爲什麼? – Ryan

回答

0

刪除的怪物和使用:

DirectoryIndex index.html 

還缺少資源:

FallBackResource /index.html 
相關問題