问题
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