Adam Meyer 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

Hi,
     In .htaccess you specify the rewrite url rule to redirect 
domain.com to www.domain.com
     Place below code in .htaccess

       RewriteEngine On
       RewriteCond %{HTTP_HOST} !^www
       RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [L,R=301]

Thanks,
Priyanka Pathak
-- 
Posted via http://www.ruby-forum.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