perl-asp mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John D. Leonard II" <>
Subject FW: Problem with mod_rewrite
Date Sun, 17 Jun 2001 21:15:28 GMT

I tried the rewrite on another box - a RedHad 6.2 box running perl 5.6.0,
apache 1.3.19 and mod_perl 1.25.

The rewrite works correctly.  It appears that something is goofy with my AIX
version of apache and/or mod_rewrite.


-----Original Message-----
From: John D. Leonard II []
Sent: Saturday, June 16, 2001 2:23 AM
Subject: Problem with mod_rewrite


I realize that this is not an Apache::ASP problem, but perhaps someone with
a bit more experience with mod_rewrite can help me out.

I got the idea for this rewrite from a recent post to this list.  I
regularly use the "pathinfo" portion of a URI to access specific tables and
records in a data base.  For example, the URI

asks my ASP script to look up record "2" in table "committees".

I want apache to rewrite an incoming URI so I don't have to include the
"index.asp" when one of my keyword table names is recognized.  For example,
when apache sees my keyword "/committees"  at the beginning of a URI, I want
it to substitute a file name, and then the keyword.  For example:

/committees/2  -> /index.asp/committees/2

I can not get mod_rewrite to utilize the grouping characters in the rewrite
rule.  Mod_rewrite is recognizing the need to substitute, and is placing the
/index.asp/ into the line, but is not using the $1 and $2 groups.

I'm running apache 1.3.20, mod_perl 1.25, perl 5.6.0, Apache::ASP 2.15 on
AIX 4.3.3.

Here is the snippet from my httpd.conf:

    DocumentRoot "/home/htdocs/a3a10"
    ErrorLog logs/a3a10_error_log
    CustomLog logs/a3a10_access_log common
    RewriteEngine on
    RewriteLog logs/rewrite
    RewriteLogLevel 9
    RewriteRule  ^/(committees)(.*)     /index.asp/$1$2

Here is the complete mod_rewrite logfile output: - - [16/Jun/2001:01:55:29 -0400]
[][rid#200fe200/initial] (2) init rewrite
engine with requested uri /committees/2 - - [16/Jun/2001:01:55:29 -0400]
[][rid#200fe200/initial] (3) applying pattern
'^/(committees)(.*)' to uri '/committees/2' - - [16/Jun/2001:01:55:29 -0400]
[][rid#200fe200/initial] (2) rewrite
/committees/2 -> /index.asp/

The $1 and $2 are empty! - - [16/Jun/2001:01:55:29 -0400]
[][rid#200fe200/initial] (2) local path
result: /index.asp/ - - [16/Jun/2001:01:55:29 -0400]
[][rid#200fe200/initial] (2) prefixed with
document_root to /home/htdocs/a3a10/index.asp/ - - [16/Jun/2001:01:55:29 -0400]
[][rid#200fe200/initial] (1) go-ahead with
/home/htdocs/a3a10/index.asp/ [OK] - - [16/Jun/2001:01:55:29 -0400]
[][rid#20102240/subreq] (2) init rewrite
engine with requested uri / - - [16/Jun/2001:01:55:29 -0400]
[][rid#20102240/subreq] (3) applying pattern
'^/(committees)(.*)' to uri '/' - - [16/Jun/2001:01:55:29 -0400]
[][rid#20102240/subreq] (1) pass through /

What am I missing?  It has got to be something simple!  I've tried a variety
of combinations (fiddling for about 5 hours) without any luck!


John D. Leonard II, Associate Professor            Phone: 404/894-2360
School of Civil and Environmental Engineering       FAX:  404/894-2278
Georgia Institute of Technology 
Atlanta, GA  30332-0355    

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message