httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <cove...@gmail.com>
Subject Re: [users@httpd] rewrite and/or proxy question
Date Thu, 14 May 2009 11:09:51 GMT
On Thu, May 14, 2009 at 6:57 AM, André Warnier <aw@ice-sa.com> wrote:

> For example, would the following work, or am I forgetting something, doing
> something bad, risk security bypasses, etc.. ?
>
> RewriteCond %{HTTP_HOST} app3.company.com
> RewriteRule ^/$ /app3/ [L]
> RewriteRule ^/app3/.+$ - [L]
> RewriteRule ^/app1/.+$ - [F]
> RewriteRule ^/app2/.+$ - [F]
> RewriteRule ^/(.+)$ /app3/$1 [L]
>


Your conditions only apply to the immediately following rule, but it
seems like your intent is to have them applied to all of them.

You might simplify by capturing the "app3" on the HTTP_HOST and using
it on the subsequent conditions/rules for ease of maintainability.




-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
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-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message