On Thu, May 14, 2009 at 6:57 AM, André Warnier <a...@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
cove...@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-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