小皮面板thinkphp框架报错:The requested URL /admin/index/index.html was not found on this server.

thinkphp框架开发使用小皮面板集成环境,在浏览器中打开报错。报错如下:

Not Found
The requested URL /admin/publicer/adminLoginPage.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

解决方案:确认是否设置伪静态。小皮面板中并非在public文件夹中设置伪静态,而是在小皮面板的域名管理中进行伪静态的设置。位置如图:


流程如下:

1、选择需要进行处理的域名》管理

2、选择伪静态

3、输入伪静态设置,分为Apache环境和Nginx环境

Apache伪静态:

<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>

Nginx伪静态:

location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}

注:配置成功后,重启服务即可。


六月初字帖坊小程序 你想要的字帖模板及工具,这里都有!