httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Re: [STATUS] Thu May 8 08:31:41 PDT 1997
Date Fri, 09 May 1997 08:25:41 GMT

In article <9705080836.aa22778@paris.ics.uci.edu> you wrote:
> 1.2b11 status as of Thu May  8 08:31:41 PDT 1997

>   * PR#503: rewrite worked with 1.2b{6,7,8} but fail with 1.2b10
>     Note that it's not related to the Configuration.tmpl rearrangement,
>     I asked the user to verify that.
>     [Roy says that the user probably screwed up the verify, since the problem
>      described is exactly what you would expect from the ordering change.]

I'm using mod_rewrite with Apache 1.2b10 here on all webservers and have a lot
of rewriting rulesets, both trivial ones and hardcore ones. All work as
expected. So, mod_rewrite is _NOT_ broken in Apache 1.2b10, it works
correctly. 

The user says in this PR#503:

| DocumentRoot /home/www/data
| <Directory /home/www/data>
| RewriteEngine on
| RewriteRule /people$ /people/ [L,R]
| RewriteRule /people/$ /cgi-bin/people [L]
| RewriteRule /people/([a-z0-9A-Z]+)$ /people/$1/ [L,R]
| RewriteRule /people/([a-z0-9A-Z]+)/$ /users/$1/www/ [L]
| RewriteRule /people/([a-z0-9A-Z]+)/(.*) /users/$1/www/$2
| Options Indexes FollowSymLinks
| AllowOverride All
| order allow,deny
| allow from all
| </Directory>
| 
| This turns /peole/name into  /users/name/www which locates the users $HOME
| via this alias:
| 
| Alias /users /home
|
| using http://server/users/name/www works just fine.

So, "Alias" is from mod_alias and "RewriteRule" is from mod_rewrite. And
mod_rewrite always was _after_ mod_alias in Configuration, also in 1.2b8 I
think. The big change was, that mod_proxy is now _before_ mod_alias and
mod_rewrite, i.e.  order is proxy,alias,rewrite, so rewriting happens in order
rewrite->alias->proxy. Result: The order is not ok, even for this user.

BUT: He says that he has an "Alias /users /home" which should translate the
generated /users/* into /home/* _AFTER_ mod_rewrite.  BUT he does not use the
[PT] (pass-through) flag at his last RewriteRule, so this "Alias" gets
ignored, not the rulesets of mod_rewrite. He has to use

| RewriteRule /people/([a-z0-9A-Z]+)/(.*) /users/$1/www/$2 [PT]
                                                           ^^^^
In other words: The above ruleset cannot work under either 1.2b10, or any
older ones. It cannot worked in his 1.2b8!! It never worked this way without
[PT].

Or I'm totally wrong?

Greetings,
                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message