【发布时间】:2014-04-13 03:34:55
【问题描述】:
我的 CodeIgniter 项目使用 url 在我的 XAMPP 系统上成功运行,
http://localhost/newsfeeds/users/allCategories/
当我将此项目移动到另一个系统时,Ubuntu 13.10 上有 LAMP 服务器。要运行相同的页面,我需要 url,
http://localhost/newsfeeds/index.php/users/allCategories/
我需要 index.php 文件,否则会显示页面未找到错误。
我的 htaccess 文件是,
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
如何在没有 index.php 的情况下在 WAMPP 和 XAMP 服务器上运行相同的项目?
【问题讨论】:
-
重写模块是否启用?
-
@Rufinus 是的,重写模块已启用
-
.htaccess文件是否已移至 LAMP 服务器? -
AllowOverride All用于 htdocs 目录? error.log 中有任何消息吗? -
@SverriM.Olsen 是的 .htaccess 文件也在 LAMP 中
标签: php .htaccess redirect ubuntu lamp