|
Hi, I currently have 2 domains that refer to the same Rails app. e.g. www.domain.com www.domain.co.uk Currently I've configured them so that they both point to the same Rails application. However I would like to change the behaviour so that anyone that types the .co.uk domain is redirected to domain.com so it's more seamless. How can I do this in the Webfaction panel? Thanks. |
|
There isn't a way to do this directly from the Control Panel; instead, you would create a simple Static/CGI/PHP application which exists solely to redirect traffic to the other domain. This is discussed in our documentation here. In a nutshell, you'll create a new application so that you have two instead of one. The second application, named something like Hope that helps! That seems awfully complicated. Any reason for not just putting
in .htaccess? That would only redirect "/" - it wouldn't redirect other URLs and it won't preserve query parameters. Well, it works for me. Try going to depanordique.com/<what-ever> and see what happens. You are correct - "Redirect 301 / http://www.example.com/" would work. There are scenarios though where you need to use mod_rewrite instead, and there are scenarios where you'd need to use a separate application. That's the most universal method - that's why it's in our docs. |