1

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 Answer 1

-1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.