Personally, I redirect www.example.com to example.com (example.com is
already a web site, no need for redundancy and it makes hard then for people
to assimilate blog.example.com (so, a blog is not a web site then?) or
newyork.example.com (where's www?) but I digress). I redirect at the Apache
level doing:

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.org www.example.org
    Redirect / http://example.com/
</VirtualHost>

The trailing slash in "Redirect / http://example.com/"; is important ;)

On Sun, Nov 8, 2009 at 23:19, Adam Meyer
<[email protected]>wrote:

>
> Hi everyone,
>
> I want to go live with my application. But something is wrong with my
> site when using www.domain.com or domain.com. It seems that it use
> different instances of the app and create different sessions.
>
> How can I configure my app to redirect to www.domain.com when someone
> calls domain.com?
>
> Thanks in advance
>
> Adam
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>


-- 
J. Pablo Fernández <[email protected]> (http://pupeno.com)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to