You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Michael Douglass <mi...@texas.net> on 1998/01/08 07:28:01 UTC
mod_rewrite not working by specs in docs
The mod_rewrite shipping with apache 1.2.5 does not meet the documented
functionality as documented on the apache web site. It states that if
I use a RewriteCondition with () groupings, that in the RewriteRule I
can use %1, %2, %3, etc to refer back to those groups. (a la $1 for
self-referencing).
I know it only works for the _last_ RewriteCond statement and that
you have to group with () the pieces you want. (I work with Perl alot,
so this is a fairly comfortable concept. :) Turning on the logging,
I show the %1s and %2s as going through verbatim.
Any assitance?
RewriteCond %{REMOTE_HOST} ^([^.]+)\.vip\.mydomain\.com
RewriteRule ^ /web/rhosts/%1
With these rules, if I come from a host "myself.vip.mydomain.com", then
it should remap me to /web/rhosts/myself; instead it shows the mapping
as going to /web/rhosts/%1.
I can check again, but the documentation on www.apache.org states that
you can use %N to backreference the last RewriteCond command in the
RewriteRule command.
Help?
--
Michael Douglass
Texas Networking, Inc.
<tnet admin> anyway, I'm off, perl code is making me [a] crosseyed toady
Re: mod_rewrite not working by specs in docs
Posted by Michael Douglass <mi...@texas.net>.
On Thu, Jan 08, 1998 at 12:28:01AM -0600, Michael Douglass said:
Never mind, I see that this is a feature in the new mod_rewrite included
in apache 1.3. Is the new mod_rewrite compatible with apache 1.2.5; ie.
can I simply download the latest mod_rewrite and compile it into my
apache 1.2.5?
> The mod_rewrite shipping with apache 1.2.5 does not meet the documented
> functionality as documented on the apache web site. It states that if
> I use a RewriteCondition with () groupings, that in the RewriteRule I
> can use %1, %2, %3, etc to refer back to those groups. (a la $1 for
> self-referencing).
--
Michael Douglass
Texas Networking, Inc.
<tnet admin> anyway, I'm off, perl code is making me [a] crosseyed toady