/    Sign up×
Community /Pin to ProfileBookmark

Running multiple domains off of the same server space…

Right now I have two domains pointing to the main index page on the server space I get from webhost4life. What I want to do is have one of the domains point to the main index page, and have the other point to an index page in a folder I create. Essentially running two “separate” sites off of the same server space. Is this possible? Would it have to be done on the server level, or is there any web code that can redirect to a page based on the URL?

to post a comment
Web Hosting

1 Comments(s)

Copy linkTweet thisAlerts:
@svidgenJun 11.2009 — You can do it either way. Your registrar should provide URL redirection for domains/subdomains. And, your server-side language should also be able to determine the host-name it referenced by, allowing you to send out the [I]Location[/I] header if necessary.

Your host should also [B]be able to[/B] point the domain at any folder you ask them to. Whether they [B]will[/B] is a different story ...

If you have access to the apache (I'm assuming apache) config files, you can see how to set up Virtual Hosts in their documentation. Your host is probably using some include file(s) that contain all of the domains on the server using these virtual host directives. It shouldn't take much more than a trained monkey to add a few lines for your particular needs.

... Bear in mind though, the monkey would need to be [I]trained[/I].

Does that help?
×

Success!

Help @xvszero spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...