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
巴扎黑2017-05-16 17:18:31
You can refer to:
Source of information
location / {
.........
##如果请求既不是一个文件,也不是一个目录,则执行一下重写规则
if (!-e $request_filename)
{
rewrite ^/PHPParser/(.*)$ /PHPParser/index.php?s= last;
break;
}
}