httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Weber <>
Subject Apache 1.3.22 gives 302 on mod_rewrite
Date Tue, 27 Nov 2001 16:04:37 GMT

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. 

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     

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


View raw message