[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-docs
Subject: Re: [users@httpd] RedirectMatch using current server name
From: Eric Covener <covener () gmail ! com>
Date: 2012-10-12 14:30:53
Message-ID: CALK=YjNV46tT1nw57WceTOcKNTJH8geJWRfS4o95oT9XpdTWAA () mail ! gmail ! com
[Download RAW message or body]
On Fri, Oct 12, 2012 at 9:15 AM, plot.lost <plot.lost@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
If you use a 2nd arg like /path/to/file.html the server will construct
a URL for the redirect based on ServerName, UseCanonicalName, etc.
This generated a warning in older levels of 2.2.x.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic