Welcome Guest, Not a member yet? Register   Sign In
Codeigniter plus SSL
#7

[eluser]mallix[/eluser]
Finally everything works as expected
This is my htaccess file:

Code:
DirectoryIndex index.php
RewriteEngine on

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.domain.com/$1 [R,L]

RewriteCond %{SERVER_PORT} 443
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/ [R=301,L]

RewriteCond $1 !^(index\.php|robots\.txt|website|files|client|favicon\.ico|style\.css|sitemap.xml)
RewriteRule ^(.*)$ ./index.php/$1 [L]

Every external load of js must be handled under https and inside the website s styles and scripts, the use of relative paths.

Also base_url:
Code:
$config['base_url'] = 'https://www.domain.com/';

Also if you are using curl to call external services either upload the .pem file in the server and pass it as a parameter on curl functions or set to 0 the followlocation option:

Code:
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0);

One thing remains.

With the current htaccess config
https://domain.com does not redirect to https://www.domain.com

What should I do ?



Messages In This Thread
Codeigniter plus SSL - by El Forum - 05-14-2012, 09:45 AM
Codeigniter plus SSL - by El Forum - 05-14-2012, 11:07 AM
Codeigniter plus SSL - by El Forum - 05-14-2012, 12:15 PM
Codeigniter plus SSL - by El Forum - 05-14-2012, 12:26 PM
Codeigniter plus SSL - by El Forum - 05-15-2012, 02:58 AM
Codeigniter plus SSL - by El Forum - 05-15-2012, 06:07 AM
Codeigniter plus SSL - by El Forum - 05-15-2012, 10:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB