Hello,
I'm trying to setup a redirect from naked domain to www. However, no matter
the source url, it always redirects to the root domain no matter where I
came from, for example:
domain.com -> www.domain.com (This is correct
behaviour)domain.com/test.html -> www.domain.com (This is
wrong)domain.com/login.html -> www.domain.com (This is wrong)
This is the code I am using in nginx to handle the redirect:
server {
listen 80;
server_name domain.com;
return 301 http://www.domain.com$request_uri;
}
server {
listen 80;
server_name www.domain.com;
...
Can anyone please explain why this might be happening? It seems the
$request_uri isn't doing anything. This is my UWSGI config:
[uwsgi]
uid = user
gid = group
socket = 127.0.0.1:8001
processes = 4
chdir = /var/www/app
virtualenv = /var/www/app/venv
pythonpath = /var/www/app/venv/bin/python
module = run
callable = app
master = 1
daemonize = /var/log/app.log
logto = /var/log/uwsgi.log
Any help would be appreciated.
James
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi