刚开始一个项目,php版本为5.6,TP版本为3.2,在配置TP配置项‘URL_MODEL’为2后,访问http://www.xxx.com/index.php/admin/index/login时正常,访问http://www.xxx.com/admin/index/login报错
错误信息:No input file specified
错误原因:.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>
修改为:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1
</IfModule>
完。