You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Jones <bi...@fccj.org> on 1998/11/29 17:00:55 UTC

mod_rewrite

Hi all :]

On a GET of http://webmaster.fccj.org:81/manual/  (which does exist!)

Using mod_rewrite syntax of -

RewriteEngine On
RewriteOptions inherit
RewriteLog logs/rewrite_log
RewriteLogLevel 3

RewriteCond /drv4/Apache/apache_1.3.3/htdocs/%{REQUEST_FILENAME} !-f
RewriteCond /drv4/Apache/apache_1.3.3/htdocs/%{REQUEST_FILENAME} !-d
RewriteCond /drv4/Apache/apache_1.3.3/%{REQUEST_FILENAME} !-f
RewriteCond /drv4/Apache/apache_1.3.3/%{REQUEST_FILENAME} !-d
RewriteRule ^(.+) http://www.fccj.org$1 [L]


This returns a URL of http://www.fccj.org/manual/index.cgi  (Wrong!)

Near as I can tell, the rewriting engine is somehow combining what's within
my
htdocs DocRoot (the index.cgi) with my orginal request (the /manual/
directory)
and then, I suppose not finding it, rewrites the whole thing incorrectly;
this action is displayed in the follow rewrite_log output:


207.203.47.58 - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#242040/initial] (2) init re
write engine with requested uri /manual/
207.203.47.58 - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#242040/initial] (3) applyin
g pattern '^(.+)' to uri '/manual/'
207.203.47.58 - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#242040/initial] (1) pass th
rough /manual/
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (2) in
it rewrite engine with requested uri /
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (3) ap
plying pattern '^(.+)' to uri '/'
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (1) pa
ss through /
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (2) in
it rewrite engine with requested uri /manual/index.cgi
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (3) ap
plying pattern '^(.+)' to uri '/manual/index.cgi'
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (2) re
write /manual/index.cgi -> http://www.fccj.org/manual/index.cgi
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (2) im
plicitly forcing redirect (rc=302) with http://www.fccj.org/manual/index.cgi
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (1) es
caping http://www.fccj.org/manual/index.cgi for redirect
sneex.fccj.cc.fl.us - - [29/Nov/1998:10:48:30 -0500]
[webmaster.fccj.org/sid#17d258][rid#246040/subreq] (1) re
direct to http://www.fccj.org/manual/index.cgi [REDIRECT/302]


This is obviously not correct.  Anyone have any ideas?

Thx!
-Sneex-  :]

PS - No I won't stop beating this to death :]