Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Redirecting folder to root with rewrite

$
0
0
I'm new to Nginx and try to redirect a directory for jpg-files to the root directory. For example the file /abc/jpg.jpg should be opened directly through /jpg.jpg.

rewrite /(.*(jpg|jpeg))$ /directory/$1 last;

This works, but so all jpg files in other directories can't be opened any more. Many greetings

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>