Auto redirect to https - how it works?

apache 2.4.10, ubuntu 15.04
What and where is LE write redirect rules?
Can’t figure out how undo reedirect rule now.

The rules will be written into the files in /etc/apache2/sites-available/ ( exactly which files in there depends if you have only one domain, of multiple domains / virtual hosts.

Commented all Redirect rules, but it’s still working.

You may need to clear your browser cache for that domain ( as it was probably a 301 redirect, that the browser has cached / remembers).

1 Like

Hello @paleale,

If you removed the Rewrite and Redirect rules and reloaded apache maybe the redirect is being performed directly by your browser because in your conf you activated HSTS. If that is the case you should see something like this:

Header always set Strict-Transport-Security ....

As I said, even if you removed this line in your apache config, your browser will try to access your site using https during the max-age time that you configured. Try it with another browser (fresh installation) or remove your browser’s cache completely.


1 Like

Here it is! That was cache. Thanks!

1 Like

Setting max-age=0 should also clear it.

1 Like