Home > Backend Development > PHP Tutorial > thinkphp在wamp 配置去掉url中index.php方法

thinkphp在wamp 配置去掉url中index.php方法

WBOY
Release: 2016-06-23 13:36:54
Original
1189 people have browsed it

调试了好久,才发现把简单的事情搞复杂了。

其实原理很简单。


1.在配置文件中

'URL_MODEL'=>2,

设置为2.


2.在php.ini中

cgi.fix_pathinfo=1

去掉前面的注释


3.在Apache下conf配置文件中,

LoadModule rewrite_module modules/mod_rewrite.so

去掉前面的注释

然后重启apache,即可。


尊重原创。

作者:新启科技

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template