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

Joe Morris morris at unc.edu
Fri Feb 20 10:46:23 EST 2004

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

| I tried this at first, a re-direct causes a loop, you come in on port
| 80, see the redirect, come in on port 443, see the Redirect, come in on
| port 443 see the Redirect....Can probably get to work with virtual
| servers. I just wanted a simple way when going to port 80 to go to
| port 443 like Jeff did. I think there is some issue in apaceh 2.x.

All you should need is the following then...

RedirectMatch permanent .* https://newsitename$1

All other environment variables will get inherited, so nothing else to
define inside of that virtual host container.

| Also if you use regular expressions you need to use "RedirectMatch"
| instead of plain "Redirect"

Right, you does need the "match" portion to match even on a wildcard

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

More information about the unclug mailing list