* Joost de Heer wrote:

> In the mod_rewrite examples page the following can be found:
>
> RewriteEngine on
> RewriteCond %{REQUEST_URI} !-U
> RewriteRule ^(.*) http://webserverB.dom/$1
>
> [Not related comment: shouldn't this be ^/(.*)]

Yes.

> A request for http://localhost/foo/bar results in the following log:
>
> [windows.joost.localnet/sid#46a8b0][rid#4b1900/initial] (3) applying
> pattern '^(.+)' to uri '/foo/bar'

This cannot be. (.+ vs .*)

Anyway, the example is misleading if not wrong. -U only figures out whether 
the URL is accessible, not if the requested resource does exist.

> So instead of getting redirected, the -U seems to get applied again, sees
> the request resulted in a 302 redirect, and decides that it's a valid URL
> after all, so it's passed through, leading to a 404 error, instead of the
> redirect.

Well, it should probably get an [NS] on the rule.
Which version are we talking about anyway?

*sigh* I think, the only weird thingy here is the rewrite guide itself :-(

nd
-- 
"Eine Eieruhr", erklärt ihr Hermann, "besteht aus einem Ei. Du nimmst
das Ei und kochst es. Wenn es hart ist, sind fünf Minuten um. Dann weißt
du, daß die Zeit vergangen ist."
                             -- Hannes Hüttner in "Das Blaue vom Himmel"

Reply via email to