G'day everyone,
I'm hoping someone will be able to assist with this. I'm using Nginx and would like to tidy the URI to make it easily readable (this will also help me as I'll be typing these in occasionally). Is it possible to convert part of the URI so it passes the path as variables to PHP?
So far my Googling seems to suggest I should be looking into the "location" option in my /etc/nginx/sites-enabled/*.conf file, but I'm not really sure what to do with it...
example
To pass "staffid" and "entry" variables to the PHP script located in /var/www/fetch/index.php I would enter:
http://servername/fetch/?staffid=12345678&entry=1221
Ideally I'd like to use this:
http://servername/12345678/1221
but it would need an exclusion if no path/variables are entered to go to ./index.php
I would also be very happy with this:
http://servername/fetch/12345678/1221