Server Alias which redirects to external URL

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

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.

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?

Sure, that could be done .. but in the near-term, using a sub-server that does a redirect is the only option, sorry.