Welcome! Log In Create A New Profile

Advanced

Re: Too Many Redirects - CDN Rewrite Rule

All files from this thread

File Name File Size   Posted by Date  
smime.p7s 6 KB open | download GreenGecko 03/20/2013 Read message
smime.p7s 3.5 KB open | download Kiril Kalchev 03/22/2013 Read message
Peter Booth
March 21, 2013 02:04AM
Why are you trying to rewrite your URLs at all? Why don't you simply endure that your HTML or dynamic content references images at cdn.mydomain.com?

Sent from my iPhone

On Mar 20, 2013, at 10:47 PM, "toddlahman" <nginx-forum@nginx.us> wrote:

> 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;
> }
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,237609,237609#msg-237609
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Too Many Redirects - CDN Rewrite Rule

toddlahman March 20, 2013 10:47PM

Re: Too Many Redirects - CDN Rewrite Rule Attachments

GreenGecko March 20, 2013 11:02PM

Re: Too Many Redirects - CDN Rewrite Rule

toddlahman March 21, 2013 12:20AM

Re: Too Many Redirects - CDN Rewrite Rule

Francis Daly March 21, 2013 02:12PM

Re: Too Many Redirects - CDN Rewrite Rule

toddlahman March 21, 2013 03:13PM

Re: Too Many Redirects - CDN Rewrite Rule

Jonathan Matthews March 21, 2013 03:18PM

Re: Too Many Redirects - CDN Rewrite Rule

toddlahman March 21, 2013 03:39PM

Re: Too Many Redirects - CDN Rewrite Rule

Jonathan Matthews March 21, 2013 03:54PM

Re: Too Many Redirects - CDN Rewrite Rule

toddlahman March 21, 2013 06:48PM

Re: Too Many Redirects - CDN Rewrite Rule

Peter Booth March 22, 2013 12:32AM

Re: Too Many Redirects - CDN Rewrite Rule Attachments

Kiril Kalchev March 22, 2013 05:34AM

Re: Too Many Redirects - CDN Rewrite Rule

Francis Daly March 22, 2013 05:28AM

Re: Too Many Redirects - CDN Rewrite Rule

Francis Daly March 21, 2013 03:22PM

Re: Too Many Redirects - CDN Rewrite Rule

Peter Booth March 21, 2013 02:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready