Nette 2.0.3 and HTTPS problem

Notice: This thread is very old.
jokumies
Member | 2
+
0
-

Hi all,

I have an old site using Nette 2.0.3. I'm trying to switch the site to HTTPS but for some reason the site always keeps redirecting to HTTP version.

If my .htaccess is empty, then it redirects to HTTP when accessed with HTTPS.

If I add HTTP → HTTPS redirect to my .htaccess, then it gets into a infinitive http<->https redirect loop.

So how can I either remove that redirect or set HTTPS as the default?

Thanks!

Myiyk
Member | 321
+
0
-

Hi,
in router must be added flag SECURED

https://doc.nette.org/…tion/routing#…

Last edited by Myiyk (2018-05-04 18:32)

nightfish
Member | 262
+
+2
-

You can set Route::SECURED flag for all routes by Route::$defaultFlags |= Route::SECURED;

jokumies
Member | 2
+
0
-

Got it! Big thanks to both!