Kamala Harris - Pet Store - Debt Consolidation - Song Lyrics - Wordpress Theme

PDA

View Full Version : Bizarre mod_rewrite experience


Owlcroft
Aug 3rd 2004, 3:14 am
The core line is:
RewriteRule ^essays/(.*)\.html$ http://domain.com/scripts/read.php?term=$1 [L]It's doing pretty well, except:

When the call is--
http://domain.com/essays/aword%2Fanotherword.html

--(where %2F url-encodes a slash, / ,) instead of passing aword%2Fanotherword as the variable $1 to the php script, the call goes to:
http://domain.com/essays/aword/anotherword.html

Is a major puzzlement (and pain in the elbow). Does not (.*)\.html signify that everything prior to a .html--regardless of "meaning"--will be captured into the variable $1 ? I mean, in theory I would think that I could send--

http://domain.com/essays/joke1/jest2/farce.html

--along and get joke1/jest2/farce passed as the variable to the script.

What am I missing here??!?

POSTSCRIPT: I now discover that if the %2F is replaced by a true slash, / , the thing will work. Someone gonna havta 'splain that one to me. . . .