Mailing List Archive

Apache 1.3.22 gives 302 on mod_rewrite
Hi,

I have this problem with mod_rewrite (I guess), Apache 1.3.22 on SunOS
5.7/Ultra 5. It seems really stupid and it probably is, but I already
read the faq, the docs and Google must have got a thousand hits from me
the last two days, and I'm still far from an idea...

What I'm trying to achieve:
We have a webserver running on the Ultra 5, currently Apache 1.3.6. I
try to upgrade to 1.3.22 and to make things more comfortable... the
Ultra has various aliases, and I try to redirect every request to it to
the ServerName in httpd.conf using mod_rewrite.

How:
I'm running the 1.3.22 on port 81 for testing, but afaik there's now law
a webserver must run on 80... I use mod_rewrite in the main server
directive like this:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/(.+) http://our.ultra.sun:81/$1
[R,L]
</IfModule>

Seems easy enough. And it works, but not like I intend it to work. When
I go to http://our:81, I get redirected to a site
http://our.ultra.sun:81/ which shows me "Found. The document has moved
here" and the Apache server signature. A telnet to the server reveals
following header:

HTTP/1.1 302 Found
Date: Tue, 27 Nov 2001 15:43:30 GMT
Server: Apache/1.3.22 (Unix) mod_fastcgi/2.2.10
Location: http://our.ultra.sun:81/index.html
Connection: close
Content-Type: text/html; charset=iso-8859-1

followed by the same 302-site as in the browser. I tested with Netscape
4.78 on Solaris and IE5.0 on NT (the IE doesn't even show the 302-site).

Some things I tried:
I put the rewrite instructions nearly anywhere in httpd.conf, even
created a vhost environment for it. I moved the server to port 80,
replacing the old webserver and freaking out half the company. I checked
DNS-entrys. I changed the RewriteRule to nearly anything that could
maybe make sense and to some things that don't make any sense at all.
And one thing that might give a hint in the right direction (but
obviously none I can understand): when I pointed the redirect from the
new server on port 81 to our old webserver on port 80, everything
worked... :-/

So what am I missing here?

Any help or hint would be really, really welcome...

Marc
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
Marc Weber wrote:
>
> Hi,
>
> I have this problem with mod_rewrite (I guess), Apache 1.3.22 on SunOS
> 5.7/Ultra 5. It seems really stupid and it probably is, but I already
> read the faq, the docs and Google must have got a thousand hits from me
> the last two days, and I'm still far from an idea...
>
> What I'm trying to achieve:
> We have a webserver running on the Ultra 5, currently Apache 1.3.6. I
> try to upgrade to 1.3.22 and to make things more comfortable... the
> Ultra has various aliases, and I try to redirect every request to it to
> the ServerName in httpd.conf using mod_rewrite.
>
> How:
> I'm running the 1.3.22 on port 81 for testing, but afaik there's now law
> a webserver must run on 80... I use mod_rewrite in the main server
> directive like this:
>
> <IfModule mod_rewrite.c>
> RewriteEngine on
> RewriteRule ^/(.+) http://our.ultra.sun:81/$1
> [R,L]
> </IfModule>
>
> Seems easy enough. And it works, but not like I intend it to work. When
> I go to http://our:81, I get redirected to a site
> http://our.ultra.sun:81/ which shows me "Found. The document has moved
> here" and the Apache server signature. A telnet to the server reveals
> following header:
> etc..

I'm afraid I don't understand your question. Do you have two webservers
on the same machine (1.3.6 on port 80 and 13.22 on post 81)?

Please try to think through your problem again and re-post. State
concisely:
- what you want to happen
- what is actually happening
- what directives you think are important

Please don't say "it works/it doesn't work" - describe what appears in
the browser and list what it says in the access_log and error_log.

Rgds,

owen Boyle.
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
On Tue, 27 Nov 2001, Marc Weber wrote:
>
> What I'm trying to achieve:
> We have a webserver running on the Ultra 5, currently Apache 1.3.6. I
> try to upgrade to 1.3.22 and to make things more comfortable... the
> Ultra has various aliases, and I try to redirect every request to it to
> the ServerName in httpd.conf using mod_rewrite.

I agree with Owen that your question is not exactly clear. In addition,
it seems your RerwriteRules create an infinite loop, which may be why the
browser is refusing to follow them after a certain point and just
displaying the redirect page. You rewrite to the new host, but then the
new host rewrites again back to itself, etc.

Now, ignoring everything except the above quoted paragraph, I think you
will find your answer here:
http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames

Joshua.
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
Hello,

sorry for not being precise enough.
>
[..]
>
> I'm afraid I don't understand your question. Do you have two webservers
> on the same machine (1.3.6 on port 80 and 13.22 on post 81)?

That's right. I try to replace the 1.3.6 with the 1.3.22. I compiled the
1.3.22 from source on the same machine it is running on now on port 81.

>
> Please try to think through your problem again and re-post. State
> concisely:
> - what you want to happen

The server has several DNS-entrys and can be called without it's FQDN as
http://server instead of http://server.ourdomain.com. There are several
fastcgis running where scripts point to the FQDN and don't work if you
call them by http://server, so I want to redirect any request to the
server to http://server.ourdomain.com.

> - what is actually happening

The request to http://server redirects me to
http://server.ourdomain.com, problem is, I don't get redirected to
index.html (index.html exists and is DirectoryIndex). In the browser, I
just see a page with a headline of "302 found" and on the page itself
"Found. The document has moved here." where the "here" is a link to this
same page.

> - what directives you think are important

Only thing that seems to change anything is _where_ I point the redirect
to. If I'm using:

RewriteRule ^/(.+) http://server.ourdomain.com:80/$1 [R,L]

(pointing to the 1.3.6 on port 80), I'm redirected exactly to the page I
requested. That means, I ask for "http://server:81/example.html" I get
"http://server.ourdomain.com:80/example.html".

If I change the rewrite rule to:

RewriteRule ^/(.+) http://server.ourdomain.com:81/$1 [R,L]

(now pointing to the 1.3.22 on port 81, that is, to itself) and ask for
"http://server/example.html", in the status line of the browser I see
"http://server.ourdomain.com:81/example.html", but don't get the page I
requested but the "302"-page I described before.

>
> Please don't say "it works/it doesn't work" - describe what appears in
> the browser and list what it says in the access_log and error_log.
>

Sorry, forgot that:
In the first case (redirecting to 1.3.6:80) no entry in error_log and
access_log. In rewrite_log (level 9):

192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11cfe8/initial] (2) init rewrite engine with
requested uri /
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11cfe8/initial] (3) applying pattern '^/(.+)' to
uri '/'
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11cfe8/initial] (1) pass through /
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11f000/subreq] (2) init rewrite engine with
requested uri /index.html
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11f000/subreq] (1) pass through /index.html
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11dd70/initial/redir#1] (2) init rewrite engine
with requested uri /index.html
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11dd70/initial/redir#1] (3) applying pattern
'^/(.+)' to uri '/index.html'
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11dd70/initial/redir#1] (2) rewrite /index.html
-> http://server.ourdomain.com:80/index.html
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11dd70/initial/redir#1] (2) explicitly forcing
redirect with http://server.ourdomain.com:80/index.html
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11dd70/initial/redir#1] (1) escaping
http://server.ourdomain.com:80/index.html for redirect
192.168.130.10 - - [27/Nov/2001:18:09:47 +0100]
[server/sid#f22e0][rid#11dd70/initial/redir#1] (1) redirect to
http://server.ourdomain.com:80/index.html [REDIRECT/302]

In the second case (redirecting to 1.3.22:81) no entry in error_log,
entry in access_log:

192.168.130.10 - - [27/Nov/2001:18:17:10 +0100] "GET / HTTP/1.0" 302 275
192.168.130.10 - - [27/Nov/2001:18:17:10 +0100] "GET /index.html
HTTP/1.0" 302 284

in rewrite_log:

192.168.130.10 - - [27/Nov/2001:18:17:10 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (2) init rewrite
engine with requested uri /index.html
192.168.130.10 - - [27/Nov/2001:18:17:10 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (3) applying
pattern '^/(.+)' to uri '/index.html'
192.168.130.10 - - [27/Nov/2001:18:17:10 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (2) rewrite
/index.html -> http://server.ourdomain.com:81/index.html
192.168.130.10 - - [27/Nov/2001:18:17:10 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (2) explicitly
forcing redirect with http://server.ourdomain.com:81/index.html
192.168.130.10 - - [27/Nov/2001:18:17:10 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (1) escaping
http://server.ourdomain.com:81/index.html for redirect
192.168.130.10 - - [27/Nov/2001:18:17:10 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (1) redirect to
http://server.ourdomain.com:81/index.html [REDIRECT/302]

Both cases were generated with the same request, "http://server:81/".
First request showed me the index.html, the second the "302"-page.

Thanks for your help so far!

Marc
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
Hello,

>
> I agree with Owen that your question is not exactly clear. In addition,

I agree to, I'm sorry, just did a second posting trying to be more
exact.

> it seems your RerwriteRules create an infinite loop, which may be why the
> browser is refusing to follow them after a certain point and just
> displaying the redirect page. You rewrite to the new host, but then the
> new host rewrites again back to itself, etc.
>
> Now, ignoring everything except the above quoted paragraph, I think you
> will find your answer here:
> http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames

Thanks, I've been there & tried. The logs show as far as I can see that
in fact I don't create a loop, but the redirect is done correctly. I
tried two versions of this with exactly the same request just some
minutes ago and posted the logs.

Thanks for your help.

Marc
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
On Tue, 27 Nov 2001, Marc Weber wrote:
> > Now, ignoring everything except the above quoted paragraph, I think you
> > will find your answer here:
> > http://httpd.apache.org/docs/misc/FAQ.html#canonical-hostnames
>
> Thanks, I've been there & tried. The logs show as far as I can see that
> in fact I don't create a loop, but the redirect is done correctly. I
> tried two versions of this with exactly the same request just some
> minutes ago and posted the logs.
>

I haven't looked at the logs you posted, but the configuration you sent
did not look anything like either of the two options listed in the FAQ.
If you are going to use the RewriteRule version you will absolutely need a
RewriteCond on the HTTP_HOST to prevent looping. It will never work
otherwise.

Why don't you start again with one of the options in the FAQ and let us
know what problems you find if any.

Johsua.
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
Hello,

>
> I haven't looked at the logs you posted, but the configuration you sent
> did not look anything like either of the two options listed in the FAQ.
> If you are going to use the RewriteRule version you will absolutely need a
> RewriteCond on the HTTP_HOST to prevent looping. It will never work
> otherwise.

it was a good idea with the looping. I tried a rule that will loop, just
to see what it looks like in the browser & logs.

The rule I tried is

RewriteRule ^(.*) http://server.ourdomain.com:81/$1 [R]

and that one loops for sure. It recursively adds slashes to the request,
so the log ends up with something like


192.168.130.10 - - [27/Nov/2001:18:57:20 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (2) rewrite
///////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////index.html
-> http://server.ourdomain.com:81///////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////index.html

...it seems not even to break at a length of 255.

The following I'm not completely sure of, so please s.o. correct me, if
I'm wrong:

The example in the faq is ^/(.*), which would loop too, if it wasn't
caught somewhere. That's what Joshua pointed out, and I agree
completely. Since I removed the conditions mentioned in the faq and

RewriteRule ^/(.*) http://server.ourdomain.com:81/$1 [R,L]

invoked with http://server:81/ gives in the rewrite log

192.168.130.10 - - [27/Nov/2001:20:00:57 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (2) init rewrite
engine with requested uri /index.html
192.168.130.10 - - [27/Nov/2001:20:00:57 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (3) applying
pattern '^/(.+)' to uri '/index.html'
192.168.130.10 - - [27/Nov/2001:20:00:57 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (2) rewrite
/index.html -> http://server.ourdomain.com:81/index.html
192.168.130.10 - - [27/Nov/2001:20:00:57 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (2) explicitly
forcing redirect with http://server.ourdomain.com:81/index.html
192.168.130.10 - - [27/Nov/2001:20:00:57 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (1) escaping
http://server.ourdomain.com:81/index.html for redirect
192.168.130.10 - - [27/Nov/2001:20:00:57 +0100]
[server.ourdomain.com/sid#f22e0][rid#11cfe8/initial] (1) redirect to
http://server.ourdomain.com:81/index.html [REDIRECT/302]

which doesn't look like a loop for me, couldn't it be that the "L"
catches? Kind of remembering state? I'm just guessing here, really...

>
> Why don't you start again with one of the options in the FAQ and let us
> know what problems you find if any.
>

I *started* from there. I got the result I described. I checked,
double-checked & re-checked to make sure I'm correct with the regex and
the server-names. Same result. Then I started to remove conditions. Same
result. I started over from the beginning, same result. I said "I read
the faq" because I *did* read the faq, the mod_rewrite Rewriting Guide
and Ralf Engelschalls Rewriting Guide and not because it's the most
convenient thing to say.

This isn't even the first time I set up Apache with mod_rewrite, and I
never had any problems with it.

Are there known issues with Netscape failing redirection? I know IE does
behave strange in this respect sometimes, but I don't remember about
Netscape...

Well, thanks for all the help so far...

Marc
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
On Tue, 27 Nov 2001, Marc Weber wrote:
> which doesn't look like a loop for me, couldn't it be that the "L"
> catches? Kind of remembering state? I'm just guessing here, really...

It won't loop internally, but it should create a loop between the server
and client. It is possible the browser is catching that and refusing to
go futher.

>
> >
> > Why don't you start again with one of the options in the FAQ and let us
> > know what problems you find if any.
> >
>
> I *started* from there. I got the result I described. I checked,
> double-checked & re-checked to make sure I'm correct with the regex and
> the server-names. Same result. Then I started to remove conditions. Same
> result. I started over from the beginning, same result. I said "I read
> the faq" because I *did* read the faq, the mod_rewrite Rewriting Guide
> and Ralf Engelschalls Rewriting Guide and not because it's the most
> convenient thing to say.

So I say again: start with the one in the guide. Then give us the details
about what doesn't work. It is no use giving us a configuration that
is obviously broken and asking why it doesn't work.

Alternatively, use the other suggestion in the FAQ: simple
name virtual hosts.

Joshua.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
Hi,

>
> On Tue, 27 Nov 2001, Marc Weber wrote:
> > which doesn't look like a loop for me, couldn't it be that the "L"
> > catches? Kind of remembering state? I'm just guessing here, really...
>
> It won't loop internally, but it should create a loop between the server
> and client. It is possible the browser is catching that and refusing to
> go futher.

that would explain it, yes.

[..]

>
> So I say again: start with the one in the guide. Then give us the details
> about what doesn't work. It is no use giving us a configuration that
> is obviously broken and asking why it doesn't work.

OK, so here it is:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^lexi.c-s-k.de [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^/(.*) http://lexi.c-s-k.de:%{SERVER_PORT}/$1 [L,R]
</IfModule>

That's just like in the guide, right?

Now, with Netscape 4.78 "http://lexi:81/"

rewrite_log:
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (2) init rewrite engine with
requested uri /
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (3) applying pattern '^/(.*)' to
uri '/'
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (4) RewriteCond: input='lexi:81'
pattern='!^lexi.c-s-k.de' => matched
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (4) RewriteCond: input='lexi:81'
pattern='!^$' => matched
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (4) RewriteCond: input='81'
pattern='!^80$' => matched
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (2) rewrite / ->
http://lexi.c-s-k.de:81/
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (2) explicitly forcing redirect
with http://lexi.c-s-k.de:81/
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (1) escaping
http://lexi.c-s-k.de:81/ for redirect
192.168.130.10 - - [28/Nov/2001:10:11:02 +0100]
[lexi/sid#f2ac0][rid#11d7c8/initial] (1) redirect to
http://lexi.c-s-k.de:81/ [REDIRECT/302]

and in Netscape I see a page with title "302 Found" and text "Found. The
document has moved here."

I try to telnet lexi 81:

Trying 192.168.130.4...
Connected to lexi.
Escape character is '^]'.
GET / HTTP/1.0

HTTP/1.1 302 Found
Date: Wed, 28 Nov 2001 09:20:32 GMT
Server: Apache/1.3.22 (Unix) mod_fastcgi/2.2.10
Location: http://lexi.c-s-k.de:81/
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>302 Found</TITLE>
</HEAD><BODY>
<H1>Found</H1>
The document has moved <A HREF="http://lexi.c-s-k.de:81/">here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.22 Server at lexi.c-s-k.de Port 81</ADDRESS>
</BODY></HTML>
Connection closed by foreign host.

So the header with the "Location" line is sent. So Netscape should be
redirected, but it is not. I tried on several workstations, but it was
the same result everywhere I tried. I also tried with IE 5.0 on some
NTs, IE doesn't show anything, it's just saying that the page is opened
in the status line, but it never gets there and stops after some time
with "page not available" (which really looks like a loop...).

The entries in the rewrite log are always like the one sample in this
mail. Netscape doesn't seem to be broken, the redirect works on other
websites.

> Alternatively, use the other suggestion in the FAQ: simple
> name virtual hosts.
>

Yes, that could be a solution. Or I go through the fastcgis and change
the path in every one from absolute to relative. But I really would like
to know what's going on and why the redirect doesn't work, though it
seems to be sent and received...

Marc

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
On Wed, 28 Nov 2001, Marc Weber wrote:
>
> OK, so here it is:
>
> <IfModule mod_rewrite.c>
> RewriteEngine on
> RewriteCond %{HTTP_HOST} !^lexi.c-s-k.de [NC]
> RewriteCond %{HTTP_HOST} !^$
> RewriteCond %{SERVER_PORT} !^80$

What is that? Shouldn't it be 81? In fact, you can probably just remove
that line if you are only serving one port.

> RewriteRule ^/(.*) http://lexi.c-s-k.de:%{SERVER_PORT}/$1 [L,R]

To make things clear, why not hard-code the port in there. You are only
serving one port, right?


Joshua.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
> > OK, so here it is:
> >
> > <IfModule mod_rewrite.c>
> > RewriteEngine on
> > RewriteCond %{HTTP_HOST} !^lexi.c-s-k.de [NC]
> > RewriteCond %{HTTP_HOST} !^$
> > RewriteCond %{SERVER_PORT} !^80$
>
> What is that? Shouldn't it be 81? In fact, you can probably just remove
> that line if you are only serving one port.

No, can't do that yet. The 1.3.6 is still running on 80 and we need it.
I tried ^81$ instead, but that didn't change a thing. So I went back to
a config that's as close as possible to the one in the guide...

>
> > RewriteRule ^/(.*) http://lexi.c-s-k.de:%{SERVER_PORT}/$1 [L,R]
>
> To make things clear, why not hard-code the port in there. You are only
> serving one port, right?
>

Right, 81 at the moment. Tried that too, in case {SERVER_PORT} had any
side-effects, but it doesn't. I recompiled Apache too, the most common,
most out-of-the-box config possible:

./configure \
"--with-layout=Apache" \
"--prefix=/gigd1/WWW/apache1322" \
"--enable-module=most" \
"--enable-shared=max" \

but that didn't change a thing either.

Marc

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
On Wed, 28 Nov 2001, Marc Weber wrote:

>
> Right, 81 at the moment. Tried that too, in case {SERVER_PORT} had any
> side-effects, but it doesn't. I recompiled Apache too, the most common,
> most out-of-the-box config possible:
>

Have you tried this with multiple browsers? Is it only that version of
Netscape that is failing? When you make the request, is there only a
single entry in the access log?

I'm starting to run out of ideas here. I have used this technique before
myself, but never on a non-standard port.

Joshua.


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 1.3.22 gives 302 on mod_rewrite [ In reply to ]
Hi,

> >
> > Right, 81 at the moment. Tried that too, in case {SERVER_PORT} had any
> > side-effects, but it doesn't. I recompiled Apache too, the most common,
> > most out-of-the-box config possible:
> >
>
> Have you tried this with multiple browsers? Is it only that version of

Yes, tried on some NTs with IE5, which show nothing at all except the
message that they're opening the page in the status line. After a while,
they stop with a "page not found" message. I tried only with this
version of Netscape (4.78) on different Solaris machines (it's
NFS-mounted for the whole company), but I tried with 6.2 on NT as well,
and it shows the same result.

> Netscape that is failing? When you make the request, is there only a
> single entry in the access log?

I set logging to level 9, so there are several lines, but as far as I
can see they belong to one request, starting with the "init rewrite
engine" and ending with the "REDIRECT/302".

>
> I'm starting to run out of ideas here.

Well, me too... I don't know what to try anymore.

> I have used this technique before
> myself, but never on a non-standard port.

I did something quite similar a while ago, on a non-standard port. I
tried to proxy requests from 81 on one machine in a private network to
two identical live webservers using mod_rewrite and a load-balancing
script like it's mentioned in the guide. I wanted to see how Apache
performs against the commercial loadbalancing solutions. Worked fine. I
think that one was more complicated than what I'm trying to do now...

Do you think there's a chance the 302-header _looks_ right, but isn't?
How could I find out, tcpdump maybe?

Marc

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org