原标题:thinkPHP,访问报错File not found,修改.htacc
宝塔面板配置的LAMP,上传thinkPHP,访问报错File not found,修改.htaccess则出现无法加载资源
用宝塔面板配置的LAMP,上传thinkPHP 3.2.3
访问http://www.xxx.me/Home/Index/... 直接报错File not found,console显示:
Failed to load resource: the server responded with a status of 404 (Not Found)
此时的.htaccess为默认的
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1[QSA,PT,L]
.htaccess修改为以下之后就能访问http://www.xxx.me/Home/Index/... 了
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L]
返回搜狐,查看更多
责任编辑: