Note that there are some explanatory texts on larger screens.

plurals
  1. POFirefox redirecting Nginx rewrite
    text
    copied!<p>Firefox is the only browser I am having issues with. I have found similar issues, but no solutions seem to work.</p> <p>When I visit <a href="http://example.com" rel="nofollow">http://example.com</a> nginx rewrites it as <a href="http://www.example.com" rel="nofollow">http://www.example.com</a>. I did this because the site used ssl sitewide, where now that has remains on the initial server using a subdomain, so is <a href="https://subdomain.example.com" rel="nofollow">https://subdomain.example.com</a>. Search engines, old bookmarks, and other old links attempted to take the user to <a href="https://example.com" rel="nofollow">https://example.com</a>.</p> <p>In all Browsers this works like a charm, except in firefox. </p> <p><strong>The Problem:</strong> Firefox takes the users request of <a href="http://example.com" rel="nofollow">http://example.com</a> and forwards them to <a href="https://subdomain.example.com" rel="nofollow">https://subdomain.example.com</a>.</p> <p>And then from the search engine link that reads <a href="https://example.com" rel="nofollow">https://example.com</a>, an SSL error is raised because it's trying to read subomain.example's. </p> <p>I'm getting confused and now it's 430 in the morning. Does someone have any clues here?</p> <p>Here's my nginx conf:</p> <pre><code> upstream thin_server { server 0.0.0.0:8080 fail_timeout=0; } server { listen 80 default; listen 443 ssl; ssl off; root /home/example/public; server_name example.com www.example.com; ssl_certificate /etc/nginx/ssl/www.example.com.chained.crt; ssl_certificate_key /etc/nginx/ssl/example.key; index index.htm index.html; if ($host = 'example.com') { rewrite ^/(.*)$ http://www.example.com/$1; } location / { try_files $uri/index.html $uri.html $uri @app; } location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|mp3|flv|mpeg|avi)$ { try_files $uri @app; } location @app { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://thin_server; } error_page 500 502 503 504 /500.html; client_max_body_size 4G; keepalive_timeout 10; } </code></pre> <p><strong>UPDATE</strong> Just started working randomly a couple of days later</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload