当前位置 博文首页 > 你是人间四月天:phpstudy 404 Not Found nginx/1.15.11

    你是人间四月天:phpstudy 404 Not Found nginx/1.15.11

    作者:[db:作者] 时间:2021-09-05 13:10

    设置伪静态
    nginx的报错提示:404 Not Found nginx/1.15.11
    配置:

    location / {
        try_files $uri $uri/ /index.php?$query_string;
     }
    

    apache的报错提示:Not Found
    The requested URL /admin/login was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    配置 :

    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options +FollowSymLinks
        </IfModule>
    
        RewriteEngine On
    
        # Redirect Trailing Slashes If Not A Folder...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)/$ /$1 [L,R=301]
    
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]
    
        # Handle Authorization Header
        RewriteCond %{HTTP:Authorization} .
        RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    </IfModule>
    
    cs
    下一篇:没有了