apache mod_rewrite

james o jameslist at primax.com
Fri Jan 5 07:29:40 PST 2007


i'm trying to utilize mod_rewrite on my OS X 10.4.8 server but even  
the simplest rule isn't being executed.  not sure how to read my  
rewrite .log but it looks like all my rules / "pattern" are being  
applied to '/server-status' ?

i've tried to write rules in the .htaccess file but these don't seem  
to be recognized either.

thanks for any advice or direction,
./james

/////
mod_rewrite settings for "httpd.conf"

LoadModule rewrite_module         libexec/httpd/mod_rewrite.so

AddModule mod_rewrite.c

<IfModule mod_rewrite.c>
         RewriteLog "/var/log/rewrite.log"
         RewriteLogLevel 9

         RewriteEngine On
         RewriteCond %{REQUEST_METHOD} ^TRACE
         RewriteRule .* - [F]

         RewriteRule ^james\.html$ emit.html
         RewriteRule ^/page/(.*)$ /cgi-bin/WebObjects/PWDA.woa/wa/ 
loadPage?pageId=$1 [L,PT,QSA]
</IfModule>

/////
output from "rewrite.log"

127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (2) init rewrite engine with requested uri / 
server-status
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (3) applying pattern '.*' to uri '/server-status'
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (4) RewriteCond: input='GET' pattern='^TRACE'  
=> not-matched
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (3) applying pattern '^/page/(.*)$' to uri '/ 
server-status'
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (1) pass through /server-status
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (2) init rewrite engine with requested uri / 
server-status
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (3) applying pattern '.*' to uri '/server-status'
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (4) RewriteCond: input='GET' pattern='^TRACE'  
=> not-matched
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (3) applying pattern '^/page/(.*)$' to uri '/ 
server-status'
127.0.0.1 - - [05/Jan/2007:10:18:52 -0500] [127.0.0.1/sid#1802648] 
[rid#18b3038/initial] (1) pass through /server-status


More information about the MacOSX-admin mailing list