WebFaction
Community site: login faq

Hello!

I was wondering how I can setup a redirect from a sub-domain to a specific URL. For example, redirect plus.mydomain.com to my Google+ profile.

Thanks!

asked 17 Dec '12, 20:44

oddrationale
112
accept rate: 0%


You would do this with a 301 redirect.

permanent link

answered 17 Dec '12, 23:09

johns
5.4k312
accept rate: 23%

I tried following those instructions. This is my .htaccess file

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

However, when I go to my Domain Lists, I cannot add the new static app as the handler for the domain.

The redirect does not seem to be working.

(18 Dec '12, 10:32) oddrationale

You can't add a static app as a handler for a domain via the domain list.

Instead, you must add the static app to a website at https://my.webfaction.com/websites, and configure the domain to serve that site.

Also, the rewrite rules you show above don't really look like what you described in your question. If you want to send plus.mydomain.com to your Google+ profile, then the rules would look like this:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^plus\.mydomain\.com$ [NC]
RewriteRule ^(.*)$ https://plus.google.com/12345678901234567890/posts [R=301,L]

Just be sure to replace the plus.google.com URL with your actual profile URL.

Hope that helps!

(18 Dec '12, 17:26) seanf
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

question asked: 17 Dec '12, 20:44

question was seen: 5,891 times

last updated: 18 Dec '12, 17:26

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