4 ms·
I understand the redirecting to non-www is subjective, however I find less characters in the URL is cleaner. Also for a majority of my projects cookies are not
by marshallford 12y ago
I understand the redirecting to non-www is subjective, however I find less characters in the URL is cleaner. Also for a majority of my projects cookies are not used, so it is not a big deal to use a non-www base url.(Static blogs and simple vanilla sites for various school projects, etc).
Also as far as foo.com/ -> foo.com, I was referring to the URL, not the acutal path.
example: https://www.google.com/ https://www.google.com/ redirects to https://www.google.com https://www.google.com correct? Maybe I am missing something...
- joevandyk 12y agoNo, it doesn't redirect. $ curl -I https://www.google.com/ HTTP/1.1 200 OK
- odonnellryan 12y agoI think that's just your browser removing the trailing slash.
- marshallford 12y agooh right, that makes more sense.
- neckro23 12y agoNo, that's just your browser (annoyingly) removing the trailing slash from URL shown in the address bar. http://www.foo.com/ http://www.foo.com/ is the "correct" URL. Remember how HTTP works -- you connect to foo.com port 80, then "GET / HTTP/1.1". You can't just omit the "/" and expect it to work. HTTP clients will just request "/" if no path is specified, so nginx will never even see a request that matches "^foo.com$". You'll cause an infinite redirect loop if you try to force the issue.