View Single Post
Old 6th September 2006, 06:23
Dave Lane Dave Lane is offline
Junior Member
Join Date: Mar 2006
Location: Christchurch, New Zealand
Posts: 9
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via ICQ to Dave Lane
Default Tip: URL Aliases vs. Redirects

This one had me stumped for a long time - how to use the ISPConfig interface to specify Co-Domains that should redirect vs. those that should simply be aliases...

Turns out it's easy, just not obvious.

Here's the scenario: I have a new hosting client who wants to run 2 separate Drupal sites off of one account, with two separate domains: and Because of Drupal's "multisite" capabilities, I want requests for both domains to go to the same DocumentRoot /srv/www/clientXX/web/drupal but to do so with the original domain name intact - i.e. I want the virtual host configuration to direct requests for both and to that DocumentRoot without rewriting them. That's what I refer to as domain aliasing.

To complicate things, my clients want the www. subdomains to redirect to their respective naked domains, i.e. if a user types in the URL - it should get to the right place, but the domain that's actually fed to Apache should be (without the www).

The way to achieve this is as follows:
1. create a "new site" or go to an existing site you want to modify

First the alias:
2. choose one domain as the "master" domain for the ISPConfig site "basis" - let's say
3. go to the co-domain tab and enter "new" co-domain
4. set the "domain" to be - enter nothing else (no forward info or anything - this will be an alias to the default domain, - but will not be rewritten to anything. This corresponds to simply creating a "ServerAlias" entry in the VirtualHost definition.

Now the redirects:
5. create a "new" co-domain, enter "www" for the host and "" for the domain
6. then go to the "forward" tab and enter the full URL you want to redirect to: - this will create the appropriate ServerAlias entry as well as the Rewrite rules.
7. repeat 5 and 6 for

Hope that helps someone!

Reply With Quote
Sponsored Links