Monday, February 7, 2022

Re: Off topic slightly - Apache https redirect

Yes ... that's almost what I went with after reading up on the topic. I left the 'permanent' off.

Thanks Bob and everyone.

Cheers

Mike

--
(Unsigned mail from my phone)



-------- Original message --------
From: Bob Kline <bkline@rksystems.com>
Date: 8/2/22 06:30 (GMT+10:00)
To: Django users <django-users@googlegroups.com>
Subject: Re: Off topic slightly - Apache https redirect

On Sunday, February 6, 2022 at 9:12:38 PM UTC-5 Mike Dewhirst wrote:
There seems to be a multitude of ways to redirect from http to https.
Any pointers to the absolutely correct way?


How about something like this?

<VirtualHost *:80>
  ServerName example.com
  ServerAlias www.example.com
  Redirect permanent / https://example.com/
</VirtualHost>
<VirtualHost *:443>
  ...
</VirtualHost>

 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c8c8177d-49c0-45f7-b382-31855ccb6b0an%40googlegroups.com.

No comments:

Post a Comment