Welcome! Log In Create A New Profile


URI path as variables in PHP

Posted by r31griffo 
URI path as variables in PHP
May 23, 2023 11:43PM
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...

To pass "staffid" and "entry" variables to the PHP script located in /var/www/fetch/index.php I would enter:

Ideally I'd like to use this:
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:
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready