Blogger Information
Blog 29
fans 0
comment 0
visits 46601
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
thinkphp3.2.3隐藏index.php入口文件
盼盼love的博客
Original
1286 people have browsed it

Thinkphp3.2.3,官网自带的.htaccess文件内不好使。
环境最好是phpstudy,为新人扫坑!
1.httpd.conf中去掉LoadModule rewrite_module modules/mod_rewrite.so 前面的#号
2.AllowOverride None 修改为了AllowOverride All
3.在config文件中添加以下配置: 
// URL地址不区分大小写
'URL_CASE_INSENSITIVE' => true,
//REWRITE模式
'URL_MODEL' => 2,
4.根目录.htaccess如果没有自己建也可以。
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
Rewritebase /index.php
RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

php5.6以上需添加?5.6以下没有?

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post