【发布时间】:2011-03-09 07:53:13
【问题描述】:
我似乎无法完成这项工作 - 我很确定真正的问题是我只是让自己盲目地主演,所以我希望一双新鲜的眼睛可以帮助我。
我不想在我的系统上附加多个应用程序。 此时,根文件夹中已经存在一个网站,但我不想在 CI 安装中使用一些 microsites/powerformats。
我的 mod_rewrite 看起来像这样:
RewriteCond %{REQUEST_URI} ^/(powerformat1|powerformat2)/?$
RewriteRule ^(.*)$ powerformats/index.php/$1 [L]
尽管正确获取 CI index.php,但在尝试访问 example.org/powerformat1 或 example.org/powerformat2 时,我会看到 CI 的 404 页面。
似乎无论我尝试重写规则,我要么得到 404 页面,要么什么都没有。
有什么见解吗?
-- 编辑--
我认为我的问题是 CI 实际上将“powerformat1”字符串作为第一段传递。这是我需要避免的。但是这不能通过 mod_rewrite 解决吗?
【问题讨论】:
-
第一步:检查你的日志,里面肯定有关于重写的内容。
-
@Berry - 我做到了。我得到的只是:192.168.10.175 - - [09/Mar/2011:09:04:06 +0100] "GET /powerformat1 HTTP/1.1" 404 539;我仍然验证(通过 404 页面的外观)我确实获得了 CI 代码。
标签: php apache codeigniter mod-rewrite