How can I rewrite following link in nginx?
Notice .php also, please!
This could be done with the rewrite directive using capture
groups, assuming that there are a fixed number of key/value pairs. Dealing with
an arbitrary number of key/value pairs would probably require the Lua module.
rewrite ^/([^/]+)/([^/.]+)\.([^/.]+)/([^/.]+)\.([^/.]+)$ /$1.php?$2=$3&$4=$5
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
2 years ago