Re: ContentNegotiation and ProxyBalancer

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

 



* Benjamin Krause wrote:

>    RewriteCond %{REQUEST_FILENAME} !-U
>    RewriteCond %{IS_SUBREQ} 'false'
>    RewriteRule ^/(.*)$ balancer://my_balancer%{REQUEST_URI} [P,QSA,L]
>
> and this produces the following log output:
>
> initial (2) init rewrite engine with requested uri /non_existing_url
> initial (3) applying pattern '^/(.*)$' to uri '/non_existing_url'
> sub (2) init rewrite engine with requested uri /non_existing_url
> sub (3) applying pattern '^/(.*)$' to uri '/non_existing_url'
> sub (4) RewriteCond: input='/non_existing_url' pattern='!-U' => matched
> sub (4) RewriteCond: input='true' pattern='false' => not-matched
> sub (1) pass through /non_existing_url
> initial (5) RewriteCond URI (-U) check: path=/non_existing_url ->
> status=200
> initial (4) RewriteCond: input='/non_existing_url' pattern='!-U' =>
> not-matched
> initial (1) pass through /non_existing_url
>
> Even though the url i've requested does not exist, the -U flag is
> reporting a 200 status. After all rewriting has been done i get a
> 404 - as expected. I'm not sure why the -U is reporting a 200. Any
> idea?

-U can't check for 404 because it doesn't try to deliver it. It's the right 
idea, though. Something like:

RewriteCond %{LA-U:REQUEST_FILENAME} !-f

should work (you might need to play around with the path).

nd
-- 
my @japh = (sub{q~Just~},sub{q~Another~},sub{q~Perl~},sub{q~Hacker~});
my $japh = q[sub japh { }]; print join       #########################
 [ $japh =~ /{(.)}/] -> [0] => map $_ -> ()  #            André Malo #
=> @japh;                                    # http://www.perlig.de/ #

---------------------------------------------------------------------
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