How to correct config Apache and Codeigniter?

安稳与你 提交于 2021-01-28 23:25:56

问题


I am using Apache + Codeigniter to setup an RESTful backend service.

I placed codeigniter's project folder html/ under my Apache's web folder. Then I can access it by http://localhost/html/index.php. I want to remove the folder name in my url, access my web like that http://localhost/index.php.

Could anyone can tell me how to config on Apache side or Codeigniter?

Thanks in advance!


回答1:


In Apache folder, just open filename httpd.conf and put this code at the bottom:

Listen 80
<VirtualHost *:80>
     DocumentRoot "D:/htdocs/html/"
</VirtualHost>

Tell me, if it works.



来源:https://stackoverflow.com/questions/33272182/how-to-correct-config-apache-and-codeigniter

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