I've had a search through and seen problems similar to mine, but do not match completely.
I'm running nginx with PHP for an API on a site I'm creating and I have urls such as this:
http://api.example.com/?uid=10&api=23425292134&profile
Which returns data in JSON. I'd like to know using rewrite rules how to change it to;
http://api.example.com/uid/10/api/23425292134/profile
Occasionally, but not always, the profile $_GET will have a value like this:
http://api.example.com/?uid=10&api=23425292134&profile=1
So I'd like it to be able to work with changes like that, so it resolves to:
http://api.example.com/uid/10/api/23425292134/profile/1
I have searched for quite a while, and cannot find the answer that I'm looking for to this, please also bear in mind, that some URL's will have more/less GET requests so I'm unsure if this is possible or not.
Thank you in advance!