Skip to content

Rack middleware for ditching WWW from request urls by redirecting to non-WWW version of the url.

Notifications You must be signed in to change notification settings

isabanin/www_ditcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

= www_ditcher

A tiny Rack middleware with a simple mission: to redirect everyone from WWW to a non-WWW version of the URL.

== Installation

Copy www_ditcher.rb to your lib directory and add this to environment.rb (or in Rails3, application.rb or production.rb):

 require 'www_ditcher'
 config.middleware.use "WwwDitcher"
 

== Examples

 www.something.com                  -> something.com
 www.something.com/some/other.thing -> something.com/some/other.thing
 www.something.com?some-query=true  -> something.com?some-query=true

== Copyright

Copyright (c) 2012 Ilya Sabanin.

About

Rack middleware for ditching WWW from request urls by redirecting to non-WWW version of the url.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages