I have a codeigniter project that i deployed into aws ecs cluster. i have 2 ec2 instances that i am using with a load balancer which later connects to a custom domain in route 53. In the codeigniter project i set the base variable in the config.php file to
$base = "https://".$_SERVER['HTTP_HOST'];
When i use http i get a blocked:mixed-content error but when i use https i dont get an error when i use my custom domain with https. Now my error comes when i am trying to login into the application, i get the error of too many redirects. i tried to checkout around the internet and the examples i found where not clear for me.
so below is my .htaccess file content
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
i also created a docker image and i exposed the port 80 in the dockerfile, then i placed a port mapping of 80:80 tcp in the container in ecs
Then the load balancer has also a port 80 open to open web and then the custom domain
i want the application to use https throughout all the urls i am not sure where i have to make the changes so that i solve the error, thanks in advance