Nginx伪静态

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

Apache伪静态

在网站根目录下创建.htaccess文件,设置内容如下:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>
Last modification:February 20, 2024
如果觉得我的文章对你有用,请随意赞赏