I'm trying to redirect wp-content/uploads/(.*)$
to images/$1
but this location doesn't appear to be redirecting - why? Would it be more efficient to use try_files
?
location ^/wp-content/uploads/.*$ {
rewrite ^/wp-content/uploads/([a-zA-Z\-.]+)$ /images/$1 302;
# try_files /images/$1 =404;
}