yangzailu

导航

ThinkPHP去除url中的index.php

http://www.onedayoneclass.com/index.php/Home/Index/getopenId.html

改为:

http://www.onedayoneclass.com/Home/Index/getopenId.html

 

htaccess文件必须放到跟目录下
这个文件里面加:

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>

 

posted on 2018-04-28 16:19  飞离地平线  阅读(424)  评论(0编辑  收藏  举报