nginx pseudo-static replacement character rewrite writing problem
大家讲道理
大家讲道理 2017-05-16 17:16:31
0
1
794

The url is
http://aaa.com/xxxx
or http://aaa.com/xxxx?id=bbb
How to write the configuration file to rewrite to
http:/ /aaa.com/index.php?p=xxxx
or http://aaa.com/index.php?p=xxxx&id=bbb

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
巴扎黑

You can refer to:
Source of information

location / {
                .........
                ##如果请求既不是一个文件,也不是一个目录,则执行一下重写规则
                if (!-e $request_filename)
                {
                        rewrite ^/PHPParser/(.*)$ /PHPParser/index.php?s= last;
                        break;
                }
        }
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template