WebFaction
Community site: login faq

I've got a PHP 5.4 website with two subdomains: www.example.com and example.com.

I want to redirect all traffic from example.com to www.example.com. What's the easiest way to do this on Webfaction?

asked 29 Apr '12, 10:18

callum
324
accept rate: 0%

edited 29 Apr '12, 10:20


You should be able to achieve this by following our Redirect a Domain with a Static/CGI/PHP App guide in the documentation section.

permanent link

answered 29 Apr '12, 10:25

iliasr ♦♦
2.2k14
accept rate: 34%

Thanks for the answer. It's a shame WebFaction makes you create a whole new 'application' just to do this redirection. Redirecting non-www to www (or vice versa) is a VERY common requirement, and other hosts make it easy with a checkbox in the control panel. Oh well.

(26 May '12, 07:52) callum

This is in no way required - there are many ways to do the redirection, for example using mod_rewrite rules. This is just the most straightforward way, and it's covered in our docs, while if you want to use Rewrite rules instead, you might need to look into the Apache docs on those.

(26 May '12, 08:12) todork

If you are using WordPress, the redirection can be configured easily within the admin page of your WP blog.

permanent link

answered 26 May '12, 10:29

Romel
8511117
accept rate: 40%

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
×10
×2

question asked: 29 Apr '12, 10:18

question was seen: 8,458 times

last updated: 26 May '12, 10:29

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 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