问题描述
我正在使用Apache + Codeigniter设置RESTful后端服务.
I am using Apache + Codeigniter to setup an RESTful backend service.
我将codeigniter的项目文件夹html/放在了Apache的web文件夹下.然后,我可以通过 http://localhost/html/index.php 访问它.我想删除URL中的文件夹名称,像 http://localhost/index.php 一样访问我的网站
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.
谁能告诉我如何在Apache端或Codeigniter上进行配置?
Could anyone can tell me how to config on Apache side or Codeigniter?
提前谢谢!
推荐答案
在Apache文件夹中,只需打开文件名 httpd.conf
并将此代码放在底部:
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.
这篇关于如何正确配置Apache和Codeigniter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!