我对codeigniter非常陌生。我有一个codeigniter项目,我需要做一些更改。我已经将其粘贴到htdocs中,并将application/config/config.php的base_url更改为localhost的路径。
并更改了application/config/database.php中的数据库连接
经过以上修改后,我的索引页在localhost上打开得很好。2但是所有来自索引页的链接都重定向到http://localhost/dashboard/。
我没有改变.htaccess文件内容。这里是:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
如何解决这个问题?
3条答案
按热度按时间5lwkijsr1#
如果您需要删除
index.php
,请使用此pcww981p2#
试试这个
piztneat3#
我得到了同样的问题,并解决了做以下。如果你使用codeigniter 4
转到app/config/app.php文件,
将上述行替换为