Welcome Guest, Not a member yet? Register   Sign In
Codeigniter HTTPS (SSL) What is the "Best Practice"?
#1

I have a Codeigniter application which was developed and tested on the normal http. Now the Apache server has been configured in such a way that all of the pages are stored in a single folder which is SSL enabled. The SSL certificate is in place. When I browse to the website using "https://www" then it redirects to "http://www". NOTE : I do not need to load specific pages using SSL. I just need all pages to show as HTTPS.

I have tried the proposed solutions suggested on Stack Overflow including :

1. Modifying the .htaccess file to force HTTPS

2. Setting the $config['base_url'] = "https://www.yoursite.com/";

When I tried the above method in tandem then Firefox gave the following error : "The page isn't redirecting properly. Firefox has detected that the server is redirecting the request for this address in a way that will never complete."

Many Stack Overflow contributors suggest that this should be handled by Apache only. That makes sense to me but forcing HTTPS via .htaccess gives the same error.

Is there a simple "best practice" way to do this without hooks and SSL Helpers, etc?
Reply


Messages In This Thread
Codeigniter HTTPS (SSL) What is the "Best Practice"? - by Hexagonal.org - 01-25-2016, 03:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB