httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From KEVIN ZEMBOWER <KZEMB...@jhuccp.org>
Subject [users@httpd] Problems with Apache2 Rewrite after upgrade
Date Wed, 24 Aug 2005 20:33:30 GMT
I have a rewrite directive in my conf file like this:

   RewriteEngine on
   RewriteLog /var/www/popline/logs/rewrite.log
   RewriteLogLevel 2
   RewriteRule ^/docs$  /docs/index.html
   RewriteRule ^/docs/$ /docs/index.html
   RewriteRule ^/docs/index.*                   -       [L]     #If this matches, don't do
any rewriting
   RewriteRule ^/docs/sitemap.*                 -       [L]     #If this matches, don't do
any rewriting. For Google sitemap program
   RewriteRule ^/docsum.*                       -       [L]     #If this matches, don't do
any rewriting
   RewriteRule ^/docs/([0-9]{6})$ http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe?BU=http\%3A\%2F\%2Fdb.jhuccp.org\%2Fdbtw-wpd\%2Fexec\%2Fdbtwpcgi.exe&QF0=DocNo\%&QI0=$1&TN=Popline&AC=QBE_QUERY&MR=30\%DL=1&&RL=1&&RF=LongRecordDisplay&DF=LongRecordDisplay
         [P]
   RewriteRule ^/docs/[0-9]{4}.*                -       [L]     #If this matches, don't do
any rewriting
   RewriteRule ^/.*$ http://db.jhuccp.org/popinform/basic.html  [R,L]

The purpose of line 9 is to take a URL in the form of 'http://www.popline.org/271080' and
pass it to a database-based web page.

This was working correctly until I upgraded to Debian sarge with Apache2. When working correctly,
the rewrite.log looked like this:

66.249.64.66 - - [29/Oct/2004:15:47:18 -0400] [www.popline.org/sid#80b86ac][rid#80b4484/initial]
(2) rewrite /docs/271469 -> http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe?BU=http%3A%2F%2Fdb.jhuccp.org%2Fdbtw-wpd%2Fexec%2Fdbtwpcgi.exe&QF0=DocNo%&QI0=271469&TN=Pop
line&AC=QBE_QUERY&MR=30%DL=1&&RL=1&&RF=LongRecordDisplay&DF=LongRecordDisplay
66.249.64.66 - - [29/Oct/2004:15:47:18 -0400] [www.popline.org/sid#80b86ac][rid#80b4484/initial]
(2) forcing proxy-throughput with http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe
66.249.64.66 - - [29/Oct/2004:15:47:18 -0400] [www.popline.org/sid#80b86ac][rid#80b4484/initial]
(1) go-ahead with proxy request proxy:http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe [OK]

You can click on http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe?BU=http%3A%2F%2Fdb.jhuccp.org%2Fdbtw-wpd%2Fexec%2Fdbtwpcgi.exe&QF0=DocNo%&QI0=271469&TN=Popline&AC=QBE_QUERY&MR=30%DL=1&&RL=1&&RF=LongRecordDisplay&DF=LongRecordDisplay
to see the correct output.

However, since the upgrade, the rewrite doesn't work, and this is the log entry:

162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#8299d68/initial]
(2) init rewrite engine with requested uri /docs/271077
162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#8299d68/initial]
(2) rewrite /docs/271077 -> http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe?BU=http%3A%2F%2Fdb.jhuccp.org%2Fdbtw-wpd%2Fexec%2Fdbtwpcgi.exe&QF0=DocNo%&QI0=271077&TN=Popline&AC=QBE_QUERY&MR=30%DL=1&&RL=1&&RF=LongRecordDisplay&DF=LongRecordDisplay
162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#8299d68/initial]
(2) forcing proxy-throughput with http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe
162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#829b298/initial/redir#1]
(2) init rewrite engine with requested uri /error/HTTP_FORBIDDEN.html.var
162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#829b298/initial/redir#1]
(2) rewrite /error/HTTP_FORBIDDEN.html.var -> http://db.jhuccp.org/popinform/basic.html
162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#829b298/initial/redir#1]
(2) explicitly forcing redirect with http://db.jhuccp.org/popinform/basic.html
162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#829b298/initial/redir#1]
(1) escaping http://db.jhuccp.org/popinform/basic.html for redirect
162.129.225.189 - - [24/Aug/2005:16:08:21 --0400] [www.popline.org/sid#81e9328][rid#829b298/initial/redir#1]
(1) redirect to http://db.jhuccp.org/popinform/basic.html [REDIRECT/302]

If you again click on http://db.jhuccp.org/dbtw-wpd/exec/dbtwpcgi.exe?BU=http%3A%2F%2Fdb.jhuccp.org%2Fdbtw-wpd%2Fexec%2Fdbtwpcgi.exe&QF0=DocNo%&QI0=271077&TN=Popline&AC=QBE_QUERY&MR=30%DL=1&&RL=1&&RF=LongRecordDisplay&DF=LongRecordDisplay
from the second entry, the rewrite works fine. 

Can anyone help me understand what's happening and how to fix this problem?

Thanks for your help and advice.

-Kevin Zembower

-----
E. Kevin Zembower
Internet Systems Group manager
Johns Hopkins University
Bloomberg School of Public Health
Center for Communications Programs
111 Market Place, Suite 310
Baltimore, MD  21202
410-659-6139

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message