Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Moonshine plugin for handling no-www redirects

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 moonshine
Octocat-spinner-32 spec
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
README.rdoc

Moonshine No-www

A plugin for Moonshine

A plugin for enabled redirect from www subdomain to top domain!

Instructions

  • script/plugin install git://github.com/railsmachine/moonshine_no_www.git

  • Make sure configuration[:domain] is set to what you really want!

  • Invoke the recipe(s) in your Moonshine manifest

    recipe :no_www

Example

Say you have foo.com, and you're tired of those pesky w's in your URLs.

First, open up your config/moonshine.yml (or your config/moonshine/production.yml) and make sure that the domain is set to foo.com:

:domain: foo.com

Next, add domain aliases for the www-version of your domain, in addition to any other domains your app is responsible for:

:domain_aliases:
  - www.foo.com
  - bar.com
  - www.bar.com
  - baz.com
  - www.baz.com

Finally, open up your application manifest and add the recipe:

recipe :no_www

Now you should be all good to go!

Something went wrong with that request. Please try again.