【问题标题】:CodeIgniter URL rewrite - but not on the XAMPP directoryCodeIgniter URL 重写 - 但不在 XAMPP 目录上
【发布时间】:2011-02-03 18:22:04
【问题描述】:

我想从 CodeIgniter 提供的所有页面中删除 index.php - 但我仍然希望能够正常访问我的 XAMPP 文件夹中的所有内容。

这是我的目录结构:

htdocs\
.\Application\
.\XAMPP\

我的.htaccess 文件:

RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.html$ $1.php [L]

所以,我希望能够将我的应用程序视为http:\\localhost\controller\method\arg 而不是http:\\localhost\index.php\controller\method\arg

但我也希望能够看到http:\\localhost\XAMPP\index.php - XAMPP 中有我的控制面板,就像 MySQL 一样,我无法使用我的 .htaccess 文件访问它(因为它重写为 http:\\localhost\XAMPP\ 和不是http:\\localhost\XAMPP\index.php)。

这可能吗,我该怎么做?

【问题讨论】:

    标签: php .htaccess mod-rewrite codeigniter


    【解决方案1】:

    如果我很好理解您的问题,只需将带有指令RewriteEngine off 的 .htaccess 文件放入 XAMPP 目录即可。它应该工作

    【讨论】:

      猜你喜欢
      • 2017-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-09
      • 1970-01-01
      • 1970-01-01
      • 2012-08-17
      • 1970-01-01
      相关资源
      最近更新 更多