【问题标题】:Redirect specific page via htaccess通过 htaccess 重定向特定页面
【发布时间】:2010-07-16 11:35:49
【问题描述】:

我有一个 CodeIgniter 网站,但问题是我有:

RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]

但这会导致人们从 example.com 转到 www.example.com/index.php/

我只想让他们访问 www.example.com

有什么想法吗?另外,如果他们在 example.com/page1,他们应该去 www.example.com/page1

谢谢

【问题讨论】:

    标签: .htaccess codeigniter


    【解决方案1】:

    Apache 在处理该规则之前将/ 重写为/index.php/。尝试将其移至文件顶部。

    【讨论】:

      猜你喜欢
      • 2012-11-07
      • 1970-01-01
      • 1970-01-01
      • 2019-01-15
      • 1970-01-01
      • 2021-08-18
      • 1970-01-01
      • 2017-08-16
      • 2012-10-29
      相关资源
      最近更新 更多