Cannot remove index.php from url CI based site

与世无争的帅哥 提交于 2020-01-06 20:28:13

问题


I have Code Igniter based site and I have it on ubuntu 12.04 in /var/www/mysite folder My ubuntu serves as a server so I access my site trough other computer, but both computers are on LAN network. I use http://xxx.yyy.zzz.ttt/mysite url to access it.

The problem I have is that I cannot use url without "index.php" in it. So I have http://xxx.yyy.zzz.ttt/mysite/index.php/phpinfo To acces my controller phpinfo instead of http://xxx.yyy.zzz.ttt/mysite/phpinfo

I have cheked well that mod_revrite works well with this here And also checked that the folder, files and subfolders in mysite have all 777 file permissions.

I also added all necessary rules in .htaccess file but still no success

Any idea what is causing this.


回答1:


The first thing I would do is make sure you followed all of the CI instructions.

It may be that you did not update the config file to be a blank string rather than using index.php




回答2:


Do you know what was the issue.

The default file in sites-available had option

AllowOverride None for /var/wwww

I set it to All and it worked out. :)

cheers :)



来源:https://stackoverflow.com/questions/11580970/cannot-remove-index-php-from-url-ci-based-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!