httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Wrubleski <mlwru...@math.ucalgary.ca>
Subject [users@httpd] mod_rewrite behavior changed in apache 2.0
Date Tue, 26 Nov 2002 18:11:47 GMT
Hello List,

we have been using mod_rewrite for a few years as the mechanism to drive
our template based website. The rules are:

   RewriteEngine on
   RewriteRule .*\.tmpl.* - [L]
   Rewritecond %{REQUEST_FILENAME} \.(html|htm|php|php3)
   RewriteRule ([^?]*)$ /index.tmpl?page_name=$1&%{QUERY_STRING} [L]

Summed up: for any page of type .html, .htm, .php, .php3, instead of
loading that page directly, load the template file with the intended
page passed as the 'page_name' variable.

Now these rules work fine, my problem is the difference between how
Apache 1.3 and 2.0 handle the directoryindex. In 1.3, when apache
resolves the directoryindex, it gives the result to mod_rewrite via the
REQUEST_FILENAME and all is well. But in Apache2, while the
directoryindex is resolved properly, the REQUEST_FILENAME in mod_rewrite
is '', thus the rules fail and the intended directory index file is
loaded directly instead of by the template file.

Server version: Apache/2.0.43 on Solaris 8 on Sun

I am looking for ideas on how to revert the behavior in Apache 2.0 so
that my job is easy, but failing that, suggestions on how to implement
this given the described behavior. 

Thanks in advance.

Marc Wrubleski
Dept of Mathematics and Statistics
University of Calgary




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