1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Bizarre mod_rewrite experience

Discussion in 'Apache' started by Owlcroft, Aug 3, 2004.

  1. #1
    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--

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

    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--

    --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. . . .
    Owlcroft, Aug 3, 2004 IP