Thinkphp 3.2 去掉index.php

1、httpd.conf中去掉LoadModule rewrite_module modules/mod_rewrite.so 前面的#号

2、httpd.conf 中  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>

posted @ 2019-08-30 15:48  小ྀ青ྀ年້  阅读(651)  评论(0编辑  收藏  举报