You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1999/06/17 13:05:19 UTC

trailing '/' redirects from requested port to port 80 ?

I'm back... for a minute :-)

Is there a config option to tell Apache to perform trailing '/' redirects
on port 80 even though requests are coming in on another port ?.

thanks.
rob


Re: trailing '/' redirects from requested port to port 80 ?

Posted by Rob Hartill <ro...@imdb.com>.
On Thu, 17 Jun 1999, Rob Hartill wrote:

> 
> I'm back... for a minute :-)
> 
> Is there a config option to tell Apache to perform trailing '/' redirects
> on port 80 even though requests are coming in on another port ?.
> 
> thanks.
> rob


I guess I can do what I want in a relatively clean way with this
simple change:


Index: httpd.h
===================================================================
RCS file: /imdb/cvs/apache/include/httpd.h,v
retrieving revision 1.16
diff -u -r1.16 httpd.h
--- httpd.h     1999/06/17 16:06:29     1.16
+++ httpd.h     1999/06/17 16:07:50
@@ -133,7 +133,9 @@
 
 /* -------------- Port number for server running standalone --------------- */
 
+#ifndef DEFAULT_HTTP_PORT
 #define DEFAULT_HTTP_PORT      80
+#endif
 #define DEFAULT_HTTPS_PORT     443
 #define ap_is_default_port(port,r)     ((port) == ap_default_port(r))
 #define ap_http_method(r)      "http"


and then define my default port number in my compile time Configuration.

Let me know if this will be added.

cheers
rob 


Re: trailing '/' redirects from requested port to port 80 ?

Posted by Dean Gaudet <dg...@arctic.org>.
There was a patch somewhere in the bugdb about "UseCanonicalName port" or
somesuch which may be related... my brain swapped all this stuff out to
disk long ago though, and I'm not paging it back in. 

Dean

On Thu, 17 Jun 1999, Rob Hartill wrote:

> On Thu, 17 Jun 1999, Marc Slemko wrote:
> 
> > On Thu, 17 Jun 1999, Rob Hartill wrote:
> > 
> > > 
> > > I'm back... for a minute :-)
> > > 
> > > Is there a config option to tell Apache to perform trailing '/' redirects
> > > on port 80 even though requests are coming in on another port ?.
> > 
> > Just use the Port directive.
> > 
> > Use a Listen directive to tell Apache what port to listen on, and a Port
> > directive to tell it what port to think it is listening on.
>  
> 
> I was doing that and it didn't work. I have virtual hosts that have to
> be told that their requests come in on port 4000 and they then trigger
> Apache to send out the redirects with with :4000 tagged on.
> 
> That method works without virtual hosts, but no combination of
> configs I tried would let me have working vhosts and working '/'-redirects.
> 
> 
> --
> Rob Hartill
> Internet Movie Database (www.moviedatabase.com). An Amazon.com company.
> 
> 


Re: trailing '/' redirects from requested port to port 80 ?

Posted by Rob Hartill <ro...@imdb.com>.
On Thu, 17 Jun 1999, Marc Slemko wrote:

> On Thu, 17 Jun 1999, Rob Hartill wrote:
> 
> > 
> > I'm back... for a minute :-)
> > 
> > Is there a config option to tell Apache to perform trailing '/' redirects
> > on port 80 even though requests are coming in on another port ?.
> 
> Just use the Port directive.
> 
> Use a Listen directive to tell Apache what port to listen on, and a Port
> directive to tell it what port to think it is listening on.
 

I was doing that and it didn't work. I have virtual hosts that have to
be told that their requests come in on port 4000 and they then trigger
Apache to send out the redirects with with :4000 tagged on.

That method works without virtual hosts, but no combination of
configs I tried would let me have working vhosts and working '/'-redirects.


--
Rob Hartill
Internet Movie Database (www.moviedatabase.com). An Amazon.com company.


Re: trailing '/' redirects from requested port to port 80 ?

Posted by Marc Slemko <ma...@znep.com>.
On Thu, 17 Jun 1999, Rob Hartill wrote:

> 
> I'm back... for a minute :-)
> 
> Is there a config option to tell Apache to perform trailing '/' redirects
> on port 80 even though requests are coming in on another port ?.

Just use the Port directive.

Use a Listen directive to tell Apache what port to listen on, and a Port
directive to tell it what port to think it is listening on.