Is there a way to obtain a url path (for example index.php/sales, extracting only 'sales') using php code without htaccess? I have an mvc project (using apache) and works fine but had to move to a vagrant server that uses nginx. From reading, I must either convert the htaccess rules to nginx server rules. But the box is pre-configured with nginx. Not sure if there is a work around here. Suggestions and workarounds are welcome. Thank you.
My htaccess file is:
RewriteBase /
RewriteCond %{REQUEST_FILENAME}% !-d
RewriteCond %{REQUEST_FILENAME}% !-f
# Do not route static files in the public directory
RewriteRule \.(js|css|svg|gif|jpg|jpeg|png)$ - [L]
RewriteRule ^/?editcategory/(.*?)/?$ /editcategory?categoryid=$1 [L]
# Route everything else to index.php in the public directory
# Note: name-router get variable used for public user profiles
RewriteRule ^(.*)$ index.php?name-router=$1 [QSA,L]
P.S: I am very new to nginx so don't want to complicate things the more.