0
votes

I want to be able to use a relative path in a query string parameter but it seems that I can't without a rewrite rule to point to the absolute path on the server. This is my pseudo-working url with the query string:

www.example.com/service?req=/var/www/nginx/public/files/name.jpg

but I would like to have my users and website use the following url:

www.example.com/service?req=/files/name.jpg

(ie. hiding the root directory/path of the site and making the url shorter/cleaner)

1

1 Answers

0
votes

The rewrite is needed either ways, either on nginx level, or app level, and I would prefer the app level more than splitting my config into 2 places, it should be a simple append.