[英]rewrite url using nginx
Anyone can help me, i want to rewrite url from 任何人都可以帮助我,我想重写网址
http://localhost/auditsi/cms3/index.phpdirMod=jobseeker&dirAct=myaccount&dirPref=view_front&dirMn=lWU=
http://localhost/auditsi/cms3/index.phpdirMod=jobseeker&dirAct=myaccount&dirPref=view_front&dirMn=lWU=
to 至
http://localhost/auditsi/cms3/jobseeker/myaccount/view_front/lWU=
http:// localhost / auditsi / cms3 / jobseeker / myaccount / view_front / lWU =
where /auditsi/cms/
is directory. /auditsi/cms/
是目录。
my rewrite here: 我在这里重写:
location / {
}
location /auditsi/cms3/ {
index index.php index.html;
rewrite ^(.*)/(.*)/(.*)$ /index.php?dirMod=$1&dirAct=$2&dirPref=$3 break;
}
I've learn from wiki nginx but never succses :( 我已经从nginx维基学习,但从未成功:(
please help me. 请帮我。
Please, try this: 请尝试以下方法:
server {
rewrite ^/auditsi/cms3/(.*)/(.*)/(.*)$ /index.php?dirMod=$1&dirAct=$2&dirPref=$3 break;
location {
}
location /auditsi/cms3/ {
index index.php index.html;
}
....
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.