On Fri, Oct 12, 2012 at 2:15 PM, plot.lost <plot.l...@gmail.com> wrote:
> Is  there a way to do something like the following where the domain part is
> replaced by whatever has been configured in ServerName
>
> RedirectMatch permanent ^/$ http://the.domain.com/path/to/file.html
>
> i.e. where 'the.domain.com' is whatever the current ServerName is without
> having to edit the RedirectMatch line (it would be in a config section that
> gets included into several different virtual hosts). Want to keep this in
> the main config files, not in any .htacess files
>
> Thanks in advance for any help on this.
>

RedirectMatch permanent ^/$ /path/to/file.html

Apache will construct a canonical URL from the '/path/to/file.html'
component, this will use the ServerName, if you have UseCanonicalName
on.

Cheers

Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to