[Linux-disciples] ModRewrite Stumpage--Solved

Adam Kessel linux-disciples@bostoncoop.net
Fri, 31 Oct 2003 12:19:46 -0800


--tThc/1wpZn/ma/RB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Oops, I solved my own problem!

Here's what was going on:

On Fri, Oct 31, 2003 at 11:40:36AM -0800, Adam Kessel wrote:
> RewriteCond %{QUERY_STRING} rightframe\=3Dabout
> RewriteRule weblog /adam/cgi-bin/blosxom.cgi/this_weblog/about.html [L]

This rule itself set up an internal infinite loop. I guess even with the
[L] for last, if the rule generates a string that itself matches the
rule, it gets stuck forever.  Having the rule rewrite to directory
"this_weblog" meant that it would still match the pattern "weblog"; this
was the only entry where the target directory included the string
"weblog"; so any of the following rules fixed it:

RewriteRule ^weblog /adam/cgi-bin/blosxom.cgi/this_weblog/about.html [L]
RewriteRule weblog$ /adam/cgi-bin/blosxom.cgi/this_weblog/about.html [L]
RewriteRule ^weblog$ /adam/cgi-bin/blosxom.cgi/this_weblog/about.html [L]
RewriteRule weblog /adam/cgi-bin/blosxom.cgi/this_weblog/about.html? [L]

etc..  The last one fixes it because, by attaching a ? to the end, it
"clears" the query string, so the RewriteCond no longer matches.

For those of you who have no idea what I'm talking about, please return
to your regularly scheduled activities.

I think posting to this list and receiving my question back to myself did
help me figure it out, though.
--=20
Adam Kessel
http://bostoncoop.net/adam

--tThc/1wpZn/ma/RB
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/osPidTf3ZklQ6qYRAnOQAKDDAjbo60lDlpPdUXHKfQsUeFZomACgoIe5
+P8s0lI5p0epFc88J6W+CcE=
=HmFa
-----END PGP SIGNATURE-----

--tThc/1wpZn/ma/RB--