Re: rewrite and/or proxy question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 14, 2009 at 6:57 AM, André Warnier <aw@xxxxxxxxxx> 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@xxxxxxxxx

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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux