≡

wincent.dev

  • Products
  • Blog
  • Wiki
  • Issues
You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Home » Issues » Feature request #1270

Feature request #1270: Always redirect from rails subdomain to wincent.dev

Kind feature request
Product wincent.dev
When Created 2009-04-06T11:41:44Z, updated 2009-06-26T05:15:39Z
Status closed
Reporter Greg Hurrell
Tags no tags

Description

At the moment you can access this site via wincent.dev or thes rails subdomain.

wincent.dev is the "official" address, and the rails subdomain is the address I used during development before upgrading the Rails application to "official" status.

After moving going live with the app on wincent.dev I allowed the rails links to keep working seeing as there are already a lot of links in Google etc which point to the rails subdomain address.

The problem, however, is if someone happens to be hitting the site via the rails subdomain and they hit an uncached page, the page will be cached using the rails subdomain as the address for all absolute links (and most of the links are absolute, not host-relative).

From then on, people visiting the site via wincent.dev will see cached content links which take them to the rails subdomain. (The reverse is also true but doesn't matter as much seeing as anyone accessing via the rails subdomain is already on an "unofficial" channel.)

The problem here is that cookies are per domain, and if you're logged in via wincent.dev then you won't be logged in via the rails subdomain. I don't want to share cookies across all domains on the site; there are other specific domains such as the staging environment where I explicitly do not want cookies from the main site to be shared.

So I am going to set up an automatic redirect at the nginx level. In this way old links from external sites will still work, but I won't have these unwanted rails URLs appearing in the caches.

Comments

  1. Greg Hurrell 2009-04-06T11:41:50Z

    Status changed:

    • From: New
    • To: Open
  2. Greg Hurrell 2009-06-26T04:59:41Z

    See also ticket #1333, "Duplicate entries in Atom feeds", one of the nastier consequences of the dual domain names.

  3. Greg Hurrell 2009-06-26T05:15:14Z

    Ok, this is now done.

    Will mark as closed.

  4. Greg Hurrell 2009-06-26T05:15:39Z

    Status changed:

    • From: open
    • To: closed
Add a comment

Comments are now closed for this issue.

  • contact
  • legal

Menu

  • Blog
  • Wiki
  • Issues
  • Snippets