有时候使用thinkphp的时候,删除入口文件会提示
No input file specified
原因是.htaccess的原因,写成下面这样就可以隐藏index.php入口文件了,他的原理是用正则表达式来控制路由
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>