5

In webfaction, I want to redirect mysite.com to www.mysite.com

I have the following:

  • A subdomain www.mysite.com. It has a website with a Django app.

  • A subdomain mysite.com. It has a website which has a Static/CGI/PHP app. This app is called redirect.

  • In webapps/redirect I have created a file .htaccess. (BTW, this kept "disappearing". In ssh use ls -a to see that it is actually there.)

This file look like this:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} mysite.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]

(Also tried with ^ in front of mysite.com$)

When I go to mysite.com I see the default page "Hello, World" instead of what I see when I go to www.mysite.com

Not sure what to do from here.

user984003
  • 28,050
  • 64
  • 189
  • 285

1 Answers1

3

After several hours of doing other stuff, it now works without my having changed anything.

user984003
  • 28,050
  • 64
  • 189
  • 285