CodeIgniter Forums
Forcing a redirect from HTTPS to HTTP for one controller - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Forcing a redirect from HTTPS to HTTP for one controller (/showthread.php?tid=83580)



Forcing a redirect from HTTPS to HTTP for one controller - wiwrada da - 10-07-2022

Hi
I've implemented my CodeIgniter 2.x site on a server with SSL and have included a .htaccess file with all the relevant redirects to force HTTPS. However, I need one part of my site to remain HTTP and I'm struggling with this because of the way CodeIgniter processes requests through the index.php file. I want to keep mydomain.com/cron as HTTP and cron is of course a controller processed in the same way as all other controllers. So far, my .htaccess file looks like this:-

Thanks