重命名CodeIgniter项目文件夹导致“未找到请求的URL”;错误


Renaming CodeIgniter project folder causes "The requested URL not found" error

我已经用CodeIgniter创建了我的项目,我把它放在MAMP上,它正常工作。文件夹名称是"Project",但我现在把它改成"Filmsite"。

我已经改变了base_url在config/config.php

$config['base_url'] = 'http://example.com/Project/';

:

$config['base_url'] = 'http://example.com/Filmsite/';

如果我打开索引,网站工作正常,但如果我试图点击链接,收到这条消息:


未找到请求的URL/Project/index.php没有找到服务器。

有人能帮我一下吗?

由于项目不位于域的根,我最好的猜测是你可能有RewriteBase /Project/在你的.htaccess文件一个重写规则,如:

RewriteRule ^(.*)$ Project/index.php/$1 [L]

如果是,只需将Project更改为您想要的任何内容。