httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "scott leonard" <b...@scottleonard.org>
Subject Re: [users@httpd] mod_rewrite not rewriting default index document
Date Fri, 05 Sep 2003 18:12:53 GMT
maybe i should be more clear here:

i want request all requests for html file to be passed to a php script for
parsing.  the problem is with the implied default document in a directory.
a request to http://example.com/something/ should be rewritten to
/template.php?r=index.html is that default document in that directory is a
index.html (of course).

my previous redhat 7.2 setup worked just fine with the below RewriteRule.
_
scott

----- Original Message -----
From: "andrea" <apachelist@libero.it>
To: <users@httpd.apache.org>
Sent: Thursday, September 04, 2003 11:47 PM
Subject: Re: [users@httpd] mod_rewrite not rewriting default index document


> Hi Scott,
>
> AFAIK,
> in my opinion it will work with 2.0 but not with 1.3
>
> .*? is a ``greedy'' and it will be available with PerlRegEx,
> http://www.perldoc.com/perl5.6.1/pod/perlre.html, but not with POSIX
> regexps ( those used with mod_rewrite 1.3 )
>
> In fact testing on my 1.3 local server that regex wasn't be parsed,
> on my 2.0 local server it was parsed fine.
>
> If you want to redirect ``everything containing .html'' you can use:
>
> RewriteRule ^(.*\.html.*)$ /template.php?r=$1
>
> It will work for boths 1.3 and 2.0
>
>
> /Andrea
>
> scott leonard wrote:
> > this directive use to work in my apache 1.3 install:
> >
> > RewriteRule   ^(.*?\.html.*?)$    /template.php?r=$1
> >
> > now, with my apache 2.0 install, it doesn't rewrite the implied
index.html
> > is the URL ends with a directory.  anyone familiar with this?
> > _
> > scott
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> >
>
>
> ---------------------------------------------------------------------
> 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
>
>


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