For Apache, you can add the code below to the /public/.htaccess file in your ROR application. I use this for most of my applications because I don't like www
RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.(.*) [NC] RewriteRule ^(.*) http://%1/$1 [R=301,L]
Hope this helps
source share