Redirecting requests to production wp-content/uploads

I’m evaluating Local coming from VVV. My standard practice is to add the following snippet to into vvv_root/config/nginx-config/sites/examplesite.conf

# Grab uploads from the live site
location /wp-content/uploads/ {
	if (!-e $request_filename){
		rewrite ^/wp-content/uploads/(.*)$1 redirect;

But when I put the same snippet into /Local Sites/examplesite/conf/nginx/site.conf and restart from the Local UI it doesn’t appear to redirect.

Any ideas where I’m going wrong?

1 Like

Hey Colin,

I just tried this and it worked. I put the location block right above include do-not-modify/*.conf;

2 posts were merged into an existing topic: How to redirect website images to Live site url’s to save downloading all assets to local