WebFaction
Community site: login faq

How can I work it so that if someone goes to podcast.mydomain.com they get the content from mydomain.com/feed/podcast but never see that URL? I only want them to see podcast.mydomain.com, so a 301 Redirect isn't what I'm looking for.

And mydomain.com/feed/podcast is a dynamically generated URL, so I can't use a standard symlink either.

asked 10 Jun '15, 13:08

PeterA
10431022
accept rate: 14%


Okay, can you try this. In the dashboard add the subdomain to the primary domain record so that they are both listed using the same application. Then add something like this in that applications '.htaccess' directory:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^podcast.mydomain.com$
RewriteCond %{REQUEST_URI} !feed/podcast/
RewriteRule (.*) /feed/podcast/$1 [L]

There are other ways you can try masking the URL if that is not sufficient:

Domain masking
URL Masking

Hope this helps!

permanent link

answered 10 Jun '15, 21:51

NickR ♦♦
4165
accept rate: 18%

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
×12
×9

question asked: 10 Jun '15, 13:08

question was seen: 2,344 times

last updated: 10 Jun '15, 21:51

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