Submitted by fuerst on Tue, 03/30/2010 - 03:23
Hi,
I want to ask for the following feature in Virtualmin:
When creating a Virtual Server of Type "Alias of domain.tld" with option "Adding ServerAlias to parent" (defined in System Settings -> Server Templates -> Default -> Apache Website) I want to have an option for defining a redirect to an external URL. Currently this can be configured manually using "Services -> Configure Website" (editing the Apache directives) by adding this Rewrite Rule:
RewriteCond %{HTTP_HOST} =sub.domain.tld RewriteRule ^(.*) http://external.tld/ [R]
Would be nice to have an option to define this setting in the Virtual Server configuration. What do you think?
Thanks, Bernhard Fürst
Status:
Closed (works as designed)
Comments
Submitted by JamieCameron on Tue, 03/30/2010 - 17:45 Comment #1
An alias domain that redirects externally doesn't really make sense, as an alias is supposed to be just another name for a domain on your system.
Instead, create a sub-server, and then go to Server Configuration -> Website Redirects, and create a redirect from / to the destination URL.
Submitted by fuerst on Wed, 03/31/2010 - 02:15 Comment #2
Thats right. Alas using a sub-server just for a redirect would take one Virtual server seat from my Virtualmin license anyway.
May be enhancing the sub-server concept by a "redirect only" type which does not count as real sub-server would be a solution?
Submitted by JamieCameron on Wed, 03/31/2010 - 02:32 Comment #3
Sure, that could be done .. but in the near-term, using a sub-server that does a redirect is the only option, sorry.