I have this NGINX configuration:
root /var/www/web;
index index.php;
server_name domain.com;
access_log off;
error_log on;
location / {
rewrite ^/(.*)$ /index.php?tag=$1&page=1 last;
}
Now, I want to redirect url something like
"domain.com/index.php?tag=1§ion=2&type=3" to "domain.com/tag/section/type"
how can I do that, where should I put the code? please help,
Thankyou
I already tried:
location / {
rewrite ^/index.php?tag=(.*)§ion=(.*)&type=(.*)$ /$1/$2/$3 permanent;
rewrite ^/(.*)$ /index.php?tag=$1&page=1 last;
}
but it didnt work..
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…