On Fri, Oct 8, 2010 at 2:14 PM, Brian Hirt <bh...@me.com> wrote:
> Is there any way to accomplish something like the following?
>
> RewriteMap hn txt:/apache/config/hostname.map
> RewriteCond %{HTTP_HOST}        ${hn:www} [NC]
>

you can't have variables of any kind in the regex, because it's only
compiled once not per-request.

You can put both the variable and the HTTP_HOST in the test string
(first parm) with some separator then make sure they're equal by using
an internal backreference instead of one fluffed up my rewrite itself:

e.g.

RewriteCond %{HTTP_HOST},${hn:www} ^([^,]+),\1

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to