Cause: After installing thinphp6
, it was found that the controller could not be accessed. If it was accessed directly through URL
, an error was reported< /span>404
.
Positive cause: Nginx
disapprovalURL
ofPathInfo
.
Solution: Configure pseudo-static.
Pseudo-static code:
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
}
phpstudy configuration:
Website->Management->pseudo-static and fill in it伪静态代码
Pagoda configuration:
You can also configure it directly in nginx.conf