Skip to content

Instantly share code, notes, and snippets.

@jhubert
Created January 11, 2011 08:02
Show Gist options
  • Save jhubert/774181 to your computer and use it in GitHub Desktop.
Save jhubert/774181 to your computer and use it in GitHub Desktop.
This code would be placed somewhere in the file
before_filter :strip_www
def strip_www
if request.env["HTTP_HOST"] == "www.myapp.com"
redirect_to "http://myapp.com/"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment