Hi, I'd like to know what's the best way to redirect all traffic from http://mywebsite.com to http://www.mywebsite.com for a website running on the Rails/NGinx config. Thanks in advance for your help, Thomas. asked 16 Jan '11, 12:00 tbalthazar |
The easiest way to do a redirect is to create an additional Static/CGI/PHP application to handle requests to mywebsite.com. Remove mywebsite.com from your current rails site. Create a new Static/CGI/PHP application. Then, create a new site named redirect. Select mywebsite.com as the domain, and add your new redirect application to the URL path of /. You will then need to edit your .htaccess file to handle the redirect. We have documentation explaining it here: http://docs.webfaction.com/software/static.html#redirect-a-domain-with-a-static-cgi-php-app answered 16 Jan '11, 12:40 aaronh ♦♦ |