【问题标题】:Redirect example.com/index.php to example.com using .htaccess使用 .htaccess 将 example.com/index.php 重定向到 example.com
【发布时间】:2013-03-06 08:11:10
【问题描述】:

我想将http://example.com/index.php 重定向到http://example.com。我尝试关注但没有成功。

RewriteRule ^index\.php$ /

【问题讨论】:

  • 请比“没用”更具体。反而发生了什么? Apache 错误日志中是否记录了任何内容?

标签: .htaccess


【解决方案1】:

将其标记为显式重定向

RewriteRule ^index\.php$ / [R=301]

【讨论】:

    猜你喜欢
    • 2011-12-13
    • 2014-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多