Hi,
I am getting problem with nginx non-www to www redirection...
I have 2 config files in the /opt/mixer/nginx/conf/sites-available/ path
1. domain.com
2. www.domain.com
In domain.com I have like this...
****************************************************
# SERVER_80_BEGIN
server {
listen 80;
server_name domain.com;
server_name_in_redirect on;
access_log /var/log/nginx/domain.com.log proxy-domain_com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
client_max_body_size 50m;
root /var/www/nginx-default;
# LOCATION_BEGIN
location ~ /(.*) {
rewrite ^/(.*)$ http://www.domain.com/$1 permanent;
break;
}
*******************************************************
The issue is, when I do http://domain.com it should redirect to http://www.domain.com, and it is redirecting in FF but not in other browsers.
Any help on this is appreciated... Thanks a lot.