Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Too Many Redirects - CDN Rewrite Rule (9 replies)

$
0
0
I have tried both ways to redirect my static files to a CDN (content delivery network), but both ways result in the message "too many redirects." Can anyone tell me what I am doing wrong here?

location ~* ^.+.(jpe?g|gif|css|png|js|ico)$ {
rewrite ^ http://cdn.mydomain.com$request_uri? permanent;
access_log off;
}


location ~* \.(jpg|jpeg|gif|png|flv|mp3|mpg|mpeg|js|css|ico|woff)$ {
return 301 http://cdn.mydomain.com$request_uri;
access_log off;
}

Viewing all articles
Browse latest Browse all 7229

Trending Articles



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