Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

126
Views
Nginx How to rewrite a path ending with a .jpg extension

How to rewrite a path ending with a .jpg extension
from https://example.com/something/something/image.jpg
or https://example.com/something/something/something/something/image.jpg
to https://example.com/image.jpg
but do not rewrite https://example.com/image.jpg

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You can use the character class [^/] to match any character that is not a /.

Any URI that contains at least one character before a / will not match /image.jpg.

For example:

rewrite .(/[^/]+\.jpg)$ $1 permanent;
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!