httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralf S. Engelschall" <...@en.muc.de>
Subject Re: Unpredictable results from mod_rewrite (2.3.2)
Date Mon, 30 Sep 1996 21:59:29 GMT
On 30 Sep 1996 19:26:28 +0100 in en.lists.apache-new-httpd you wrote:
> I am having some bizarre effects from mod_rewrite.  I have the following
> htaccess file (duplicated exactly)

> AddType text/x-server-parsed-html3 htm
> RewriteEngine on
> RewriteRule   cmb.htm /fcgi-bin/up/udisplay.fpl?action=cmb
> RewriteRule   cub.htm /fcgi-bin/up/udisplay.fpl?action=cub
> RewriteRule   bio.htm /fcgi-bin/up/udisplay.fpl?action=bio
> RewriteRule   cel.htm /fcgi-bin/up/udisplay.fpl?action=cel
> RewriteRule   gen.htm /fcgi-bin/up/udisplay.fpl?action=gen
> RewriteRule   imm.htm /fcgi-bin/up/udisplay.fpl?action=imm
> RewriteRule   nrb.htm /fcgi-bin/up/udisplay.fpl?action=nrb
> RewriteRule   stb.htm /fcgi-bin/up/udisplay.fpl?action=stb
> RewriteRule   mms.htm /fcgi-bin/up/udisplay.fpl?action=mms
> RewriteRule   str.htm /fcgi-bin/up/udisplay.fpl?action=str
> RewriteRule   fad.htm /fcgi-bin/up/udisplay.fpl?action=fad

> The problem is that when I access index.html via this sort of request:

> http://server.com/dir/

> I sometimes (don't you hate it when it is only sometimes) have one of
> the pages specifies by a rewrite (can be one of a number).  Can anybody
> tell me why this might be?

Hmmm... when you request /dir/ then the URL for this per-dir context is just
empty and after mod_dir has done its internal subrequest for index.html it is
index.html. So no rule should ever apply. The only help I can give you is:
    RewriteLog      /some/where
    RewriteLogLevel 9
and look for the things happening. I never saw such a think like you
described. The rewriting engine does regex matches, so if one of the rules
applied this means that their patterns had matched.  I cannot image that.

BTW: A pattern like "cmb.htm" is not best. More correct would be the
     real regex-variant ^cmb\.htm$. But this does not solve your problem...

Greetings,
                                        Ralf S. Engelschall    
                                        rse@engelschall.com
                                        http://www.engelschall.com/~rse

Mime
View raw message