librelist archives

« back to archive

static files do not include www subdomain and cause DNS redirect loop

static files do not include www subdomain and cause DNS redirect loop

From:
chrickso
Date:
2012-06-06 @ 12:04
hey everyone,

so, calls to url_for('static') put a link in source code like '
http://mydomain.com/static/..."

But, as heroku states 'naked domains are frowned upon', i have put in a
redirect to make all non-www requests forward to www. But flask does not
pick up my files at www.pinjot.com/static/ and what i get is: no static
files served.

I should mention:

- I am using subdomains extensively throughout the site with no other
issues.

- I am using blueprints.

- I am serving static files through gunicorn in production so I have no
plans of moving static files to a different URL.

Any suggestions?

Thanks!

- chrickso