WebFaction
Community site: login faq

I have just moved to WedFaction and one thing I can't seem to find that I was able to do trivially with previous hosting is dynamic subdomains.

How do I set up automatic rewriting of subdomains to directories in the root.

For example, I might have directories a, b, c, etc in my root directory of the application called d. Then I would like a.example.com to be rewritten as example.com/a and so ~/weapps/d/a/index.html is displayed. Or a.example.com/x/y.html to be rewritten as example.com/a/x/y.html and so ~/webapps/d/a/x/y.html is displayed.

How does one do this?

Thanks

asked 05 Apr '14, 11:39

kayontoga
113
accept rate: 0%

edited 05 Apr '14, 11:46


We do not have an automated way to do this.

You could write an API script and some .htacess rules which does this for you.

permanent link

answered 06 Apr '14, 00:33

johns ♦♦
5.3k212
accept rate: 23%

Thanks - I saw that doco and I experimented with .htaccess rules - got some bugs still - would be great to see an "official" example .htaccess ruleset for this in the doco one day. Currently I've backed out to manually creating separate website/subdomain for each one as symlink application.

(06 Apr '14, 00:44) kayontoga
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:

×17
×1

question asked: 05 Apr '14, 11:39

question was seen: 1,380 times

last updated: 06 Apr '14, 00:44

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