Arc Forumnew | comments | leaders | submitlogin
1 point by akkartik 5036 days ago | link | parent

I don't follow what you mean by 'www to non-www redirect'. Can you elaborate?


1 point by rocketnia 5036 days ago | link

I believe it means responding to a request to "www.example.com" by sending a 301 redirect to the corresponding URL at "example.com".

Recently, I've been discovering that the www is a good idea in certain ways. Cookies are sent to servers based on the domain name, so having that www there is a good way to make sure that you'll be able to have a subdomain which isn't sent those cookies (say, because it's served in a way you don't fully trust, or because it's a static file subdomain which shouldn't have to wait for the browser to send it superfluous cookies). I'm kinda not sure how it all works right now, but it's got me paranoid. But I digress; whether the redirection should be done is not the question here. ^_^

-----

2 points by akkartik 5036 days ago | link

Ah, I see. I tend to put that kind of stuff in the reverse proxy (I would never hook arc up directly to port 80). Here's the relevant part of readwarp's nginx config:

  server {
    listen   80 default;
    server_name  readwarp.com alias www.readwarp.com;
    ..
  }
Apache has similar syntax, but I am happy to report I have forgotten what it is.

-----

1 point by markkat 5036 days ago | link

Yes, rocketnia is right. That's what I'm getting at. I haven't used a reverse proxy yet. But I am at least using the setuid line in svr.arc now. ;)

-----