httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: [BUG] mod_rewrite and redirect code
Date Mon, 14 Jul 1997 02:24:10 GMT
No, I skipped it because Ralf is including it in his patch which is, I
think, still awaiting votes.  Hint, hint.

On Sun, 13 Jul 1997, Dean Gaudet wrote:

> Did this go in?  PR#777 is still open.
> 
> Dean
> 
> On Sat, 5 Jul 1997, Marc Slemko wrote:
> 
> > The following rule:
> > 
> >     RewriteRule ^/~marcs/(.*) http://valis/~marcs/$1 [redirect=permanent]
> > 
> > still returns a 302 instead of a 301 like it should.  PR#777 is also about
> > this. 
> > 
> > The following patch fixes it, but I haven't really had the time to look
> > and see if it is correct.  Ralf?
> > 
> > Index: mod_rewrite.c
> > ===================================================================
> > RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v
> > retrieving revision 1.31
> > diff -c -r1.31 mod_rewrite.c
> > *** mod_rewrite.c	1997/06/22 03:45:00	1.31
> > --- mod_rewrite.c	1997/07/05 19:53:34
> > ***************
> > *** 1624,1629 ****
> > --- 1624,1630 ----
> >              and the current URL still is not a fully qualified one we
> >              finally prefix it with http[s]://<ourname> explicitly */
> >           if (flags & RULEFLAG_FORCEREDIRECT) {
> > +             r->status = p->forced_responsecode;
> >               if (  !(strlen(r->filename) > 7 &&
> >                       strncmp(r->filename, "http://", 7) == 0)
> >                  && !(strlen(r->filename) > 8 &&
> > ***************
> > *** 1659,1665 ****
> >                   else
> >                       rewritelog(r, 2, "[per-dir %s] prepare forced redirect %s
-> %s", perdir, r->filename, newuri);
> >                   r->filename = pstrdup(r->pool, newuri);
> > -                 r->status = p->forced_responsecode;
> >                   return 1;
> >               }
> >           }
> > --- 1660,1665 ----
> > 
> > 
> 


Mime
View raw message