WebFaction
Community site: login faq

How do I make mysite.com go to www.mysite.com? I have checked out the other questions about this, but they always seem to "start in the middle", where the user already has a subdomain or static app or something set up. Or knows where to find the .htaccess file, which apparently needs to be changed.

Here is what I've got:

Under Domains:

mypage.com
     mypage.com          no website
     www.mypage.com      website: mywebsite (which has a django app)

Where to go from here? Thanks!

asked 11 Nov '12, 03:15

tpip
4111321
accept rate: 0%


You would create a new "Static/CGI/PHP-5.4" application, for example, named "redirect", edit the .htaccess file for it, and then mount it to "mypage.com" (but not "www.mypage.com").

An example is available in our documentation as well. Hope that helps!

permanent link

answered 11 Nov '12, 03:32

ryans ♦♦
5.0k93360
accept rate: 43%

It still doesn't work. I created .htaccess under webapps/redirect. It says:

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

When I go to mysite.com it shows "Hello, world" instead of what appears in www.mysite.com

(11 Nov '12, 05:07) tpip

This appears to be working for your application now. I see the same thing when I visit mypage.com and www.mypage.com. If you are still seeing an issue then please open a support ticket so we can investigate.

(11 Nov '12, 09:43) aaront ♦♦

Yes, now it works, thanks. I didn't change anything, so I'm curious whether any changes were made to my account from your end?

(11 Nov '12, 12:08) tpip

When I checked the site it was working. To the best of my knowledge nothing was done from our end. Perhaps it was cached DNS on your local connection.

(11 Nov '12, 12:28) aaront ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×76
×76

question asked: 11 Nov '12, 03:15

question was seen: 7,502 times

last updated: 19 Nov '12, 00:39

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM