To begin with, let me apologise for asking yet another question referring this topic.
I think I have read through all of them in the past few days, and still can not figure out a working solution for my needs.
Essentially I need nginx to redirect:
http://www.example.com/images/subfolders/.jpeg to images.example.com/subfolders/.jpeg
I currently have this setup:
location /images/ {
rewrite ^/(.*) http://images.example.com$request_uri? permanent;
}
And it kinda works, it redirects to the images.examle.com/images/*.jpeg , but what I need is it to skip the images folder, it will be much cleaner.
As well as that, has anybody seen some site with all of those symbols (^ ~ = + *)in nginx.cnfg explained ?
The explanation of the “^ ~ = + *” symbols can be found in the documentation of the location directive.