只需3步,隐藏thinkphp网址中index.php的方法
ThinkPHP 下如何隐藏index.php
Tinkphp的URL重写模式:以后遇到相同问题,首先要想到URL重写模式。
第1步.
httpd.conf配置文件中加载了mod_rewrite.so模块
第2步.
AllowOverride None 将None改为 All
第3步.把下面的内容保存为.htaccess文件放到应用入口文件的同级目录下
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond $1 !^(DATA|images|otherThings)
RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]