This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
<b>memox wrote:</b>
<div class='quote'>How do I point a group of domains to the same directory? Obviously that'd be accomplished with a template but how exactly?</div>
Howdy,
One way to do that would be to:
* Create the directory by setting up a new Virtual Server using one of those domains (through "Create Virtual Server")
* Setup all the other domains as "Aliases" of the domain you setup above -- go into "Create Virtual Server", and choose "Alias of your_domain.com".
I just create the domains normally and then use an htaccess file to redirect to the one domain.
for each server:
this will direct all www.domain.net and domain.net to www.domain.com
RewriteCond %{HTTP_HOST} ^domain.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.net$
RewriteRule ^/?(.*)$ http://www.domain.com/$1 [R=301,L]
I just create the domains normally and then use an htaccess file to redirect to the one domain.
for each server:
this will direct all www.domain.net and domain.net to www.domain.com
RewriteCond %{HTTP_HOST} ^domain.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.net$
RewriteRule ^/?(.*)$ http://www.domain.com/$1 [R=301,L]
<b>memox wrote:</b>
<div class='quote'>How do I point a group of domains to the same directory? Obviously that'd be accomplished with a template but how exactly?</div>
Howdy,
One way to do that would be to:
* Create the directory by setting up a new Virtual Server using one of those domains (through "Create Virtual Server")
* Setup all the other domains as "Aliases" of the domain you setup above -- go into "Create Virtual Server", and choose "Alias of your_domain.com".
Have a good one,
-Eric
I just create the domains normally and then use an htaccess file to redirect to the one domain.
for each server:
this will direct all www.domain.net and domain.net to www.domain.com
RewriteCond %{HTTP_HOST} ^domain.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.net$
RewriteRule ^/?(.*)$ http://www.domain.com/$1 [R=301,L]
I just create the domains normally and then use an htaccess file to redirect to the one domain.
for each server:
this will direct all www.domain.net and domain.net to www.domain.com
RewriteCond %{HTTP_HOST} ^domain.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.net$
RewriteRule ^/?(.*)$ http://www.domain.com/$1 [R=301,L]