Skip to Content.
Sympa Menu

unclug - Re: [unclug] Redirect 80 ---> 443 with Apache?

unclug AT lists.ibiblio.org

Subject: UNC Linux Users Group

List archive

Chronological Thread  
  • From: Joe Morris <morris AT unc.edu>
  • To: UNC Linux Users Group <unclug AT lists.ibiblio.org>
  • Subject: Re: [unclug] Redirect 80 ---> 443 with Apache?
  • Date: Fri, 20 Feb 2004 10:13:03 -0500

On Fri, 20 Feb 2004, John W. Sopko Jr. wrote:

| The NC is for No Case (case insensitve match), the R is required if
| you redirect back to your own site using a http:// URL, (very cryptic, I
| had to look this up, then again mod_rewrite is pretty cryptic), the L
| is to tell mod_rewrite this is the last rule to process. The
| rule:
|
| RewriteCond %{SERVER_PORT} !^443$
| RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [NC,R,L]
|
| should not cause a loop, if coming in on port 80 it should
| re-direct to 443 and coming in on 443 will make the match
| false and skip the RewriteRule.

Do you have the following as well?

RewriteEngine On

What is SERVER_NAME set to? May want to just force that to the web site
name to avoid any confusion there. Don't have to worry about that NC
option as there as you are not comparing any such strings.

_______________________________________________
Joe Morris, Web Systems Manager
Academic Technology and Networks
The University of North Carolina at Chapel Hill




Archive powered by MHonArc 2.6.24.

Top of Page