HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Installation/Configuration (
-   -   Strange Redirect of the Co-Domains (

vaio1 15th October 2008 18:17

Strange Redirect of the Co-Domains
Hi Folks,

I have a strange problem with dozen of co-domains associated to a main domain called

Some of these domains seem to work and they redirect the user to the main domain. :)

Other domains seems to redirect at that is the main shared IP domain server. :(

If the co-domain are called with the www.mywebsite.ext works and the user will be redirects to If I call the domain with simply mywebsite.ext the user will be redirects to the main shared IP.

This is the code of the Vhosts_ispconfig.conf file at /etc/httpd/conf/vhosts


DocumentRoot /var/www/web45/web
ServerAlias * * * ....
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.jsp Default.htm default.htm
ErrorLog /var/www/web45/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
Alias /error/ "/var/www/web45/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web45/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web45/user/$1/web/$3

I need to redirect all the domains, maintaining the domain name written in the url bar, in the main domain.
Have I to create two co-domain: * and


Have you any idea about this problem?


till 16th October 2008 13:40

Make sure that all domains point with DNS A-Record to the IP of the website.

vaio1 16th October 2008 13:47

Hi Till,

the DNS-Records are OK.

Tell me if I wrong to say that the co-domains must have two for each extension in the ISPConfig Co-Domains panel.

Code:  <--- Main domain  <--- this domain must be redirect the user to and maintain the name of the domain .net in the url bar

What happens if the user type these following url?

Using these links, you will be routed under the primary domain?


falko 16th October 2008 15:39

You must create a Co-Domain for each subdomain you want to use for this web site. If the user types in a subdomain for which you did not create a Co-Domain and for which you did not create a web site of its own, he will get the Shared IP page.

vaio1 16th October 2008 15:50

Ok so the final question is:
Exists a way to redirect all the subdomains in a main domain name?


falko 17th October 2008 14:41

You can use the Apache Directives field in ISPConfig in fill in something like

ServerAlias *

vaio1 17th October 2008 14:47

ok and if the user type only the domain name without subdomain?


falko 18th October 2008 17:42

For this ISPConfig automatically creates a Co-Domain without subdomain.

vaio1 18th October 2008 19:59

My steps:

1. I have created the site and assign the first domain name
2. In the co-domains I can see
3. Now, I need to add another domain. I push on the new button
4. In the field "Domain" I write and I push on the save button
5. Now I have to create a jolly domain. I push another time on the new button.
6. In the field "Domain" I have to write * and I push on the save button

these are my steps. Are they correct?


falko 19th October 2008 14:35

Yes, or you use the Apache Directives field.

All times are GMT +2. The time now is 06:29.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.