Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 12182 invoked from network); 27 Jan 2005 16:47:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Jan 2005 16:47:36 -0000 Received: (qmail 39008 invoked by uid 500); 27 Jan 2005 16:47:17 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 38965 invoked by uid 500); 27 Jan 2005 16:47:17 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 38902 invoked by uid 99); 27 Jan 2005 16:47:16 -0000 X-ASF-Spam-Status: No, hits=2.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_MESSAGE,NO_REAL_NAME,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mhtmail01.mail.nypl.org (HELO mhtmail01.mail.nypl.org) (149.123.26.21) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 27 Jan 2005 08:47:15 -0800 Date: Thu, 27 Jan 2005 11:48:40 -0500 MIME-Version: 1.0 To: users@httpd.apache.org, apache-modules@covalent.net Cc: From: PMilanese@nypl.org X-Mailer: Microsoft Outlook v 11.00.6353, MSOC v 2.00.4007.00 Message-ID: X-MIMETrack: Serialize by Router on MHTMAIL01/MHT/Nypl(Release 5.0.11 |July 24, 2002) at 01/27/2005 11:48:14 AM, Serialize complete at 01/27/2005 11:48:14 AM Content-Type: multipart/alternative; boundary="----=_NextPart_000_08D7_01C50466.256D9100" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked Subject: RE: [users@httpd] mod_rewrite X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------=_NextPart_000_08D7_01C50466.256D9100 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Use a fully qualified URL for the rewrite. RewriteRule ^foo$ http://blah.com/foo/ [R] I have a farm and many many rewrites, and this works. _____ From: mmckenzie@unmc.edu [mailto:mmckenzie@unmc.edu] Sent: Thursday, January 27, 2005 11:42 AM To: users@httpd.apache.org; apache-modules@covalent.net Subject: [users@httpd] mod_rewrite We are currently using apache mod_rewrite to solve the trailing slash problem which works fine but now we have a different problem. We use the following rule: RewriteRule ^foo$ foo/ [R] We have three webservers running behind a load balancer. On each webserver there are two virtual hosts running on different ports. Vhost 1 = www.unmc.edu running on port 80 Vhost 2 = www.citymatch.org on port 8009 Since we are using mod_rewrite to add a trailing slash the following problem occurs: 1. The user requests the following url from their webbrowser: http://www.citymatch.org/Conference2005 2. This url is passed to mod_rewrite because it is missing the trialing slash. 3. mod_rewrite returns the url as http://www.citymatch.org:8009/Conference/ 4. Since we are using the [R] and external redirect is used. 5. The request gets to the firewall and the fire wall won't allow port 8009 and nor will the loadbalancer. I realize I could just open these ports up but that would not make us secure as we could be and that is always the goal. Is there a way to tell mod_rewrite not to add a port to the newly constructed url or tell it to use just the fully qualified name? Is it apache that adds the port number to the url? Mitchell S. McKenzie Programmer Learning Environment & Internet Services University of Nebraska Medical Center Phone: 402-559-9306 Cell Phone: 402-708-1493 University of Nebraska Medical Center E-mail Confidentiality Disclaimer : The information in this e-mail is privileged and confidential, intended only for the use of the addressee(s) above. Any unauthorized use or disclosure of this information is prohibited. If you have received this e-mail by mistake please delete it and immediately contact the sender. ------=_NextPart_000_08D7_01C50466.256D9100 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Use a fully qualified URL for the = rewrite.

 

RewriteRule ^foo$         = http://blah.com/foo/ [R]

 

I have a farm and many many rewrites, and this = works.

 


From: mmckenzie@unmc.edu [mailto:mmckenzie@unmc.edu]
Sent: Thursday, January = 27, 2005 11:42 AM
To: = users@httpd.apache.org; apache-modules@covalent.net
Subject: [users@httpd] = mod_rewrite

 



We are currently using apache mod_rewrite to = solve the trailing slash problem which works fine but now we have a different = problem.

We use the following rule:  RewriteRule ^foo$       =   foo/ [R]

We have three webservers running behind a load balancer.  On each = webserver there are two virtual hosts running on different ports. =

Vhost 1 =3D www.unmc.edu running on port 80
Vhost 2 =3D www.citymatch.org on port 8009

Since we are using mod_rewrite to add a trailing slash the following problem = occurs:

1. The user requests the following url from their webbrowser: =  http://www.citymatch.org/Conference2005

2.  This url is passed to mod_rewrite because it is missing the = trialing slash.

3.  mod_rewrite returns the url as = http://www.citymatch.org:8009/Conference/

4.  Since we are using the [R] and external redirect is used. =

5.  The request gets to the firewall and the fire wall won't allow = port 8009 and nor will the loadbalancer.

I realize I could just open these ports up but that would not make us = secure as we could be and that is always the goal.

Is there a way to tell mod_rewrite not to add a port to the newly = constructed url or tell it to use just the fully qualified name?

Is it apache that adds the port number to the url?

Mitchell S. McKenzie
Programmer
Learning Environment & Internet = Services
University of Nebraska Medical Center
Phone: 402-559-9306
Cell Phone: 402-708-1493


University of Nebraska Medical Center E-mail Confidentiality Disclaimer :

The information in this e-mail is privileged and confidential, intended = only for the use of the addressee(s) above.
Any unauthorized use or disclosure of this information is prohibited. =
If you have received this e-mail by mistake please delete it and = immediately contact the sender.

------=_NextPart_000_08D7_01C50466.256D9100--