create-redirect

Adds a web redirect or alias to some domain

A redirect maps some URL path like /foo to either a different URL, or a different directory on the same virtual server. This can be used to provide more friendly URL paths on your website, or to cope with the movement of web pages to new locations.

This command takes a manadatory --domain parameter, followed by a virtual server's domain name. The --path parameter is also mandatory, and must be followed by a local URL path like /rails or even /.

To redirect to a different URL, use the --redirect flag followed by a complete URL starting with http or https. To map the path to a directory, use the --alias flag followed by a full directory path, ideally under the domain's public_html directory.

Command Line Help

virtualmin create-redirect --domain domain.name
                           --path url-path
                           --alias directory | --redirect url
                          [--regexp]