ThinkPHP报错 The requested URL /admin/index/login.html was not found on this server.
ThinkPHP报错 The requested URL /admin/index/login.html was not found on this server.在Apache环境下报错解决方案在入口文件夹public下查看.htaccess是否存在。不存在则新建,存在的话,那内容替换为下面这串代码 就可以解决Not Fund#<IfModule mod_rewrite.c>#Opt
·
ThinkPHP报错 The requested URL /admin/index/login.html was not found on this server.
在Apache环境下报错
解决方案
在入口文件夹public下查看.htaccess是否存在。不存在则新建,存在的话,那内容替换为下面这串代码 就可以解决Not Fund
#<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>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
在Nginx环境下报错
404 Not Found nginx/1.15.11
设置伪静态
打开phpstudy > 网站 >管理 > 伪静态
添加下面代码
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
更多推荐
已为社区贡献13条内容
所有评论(0)