Welcome Guest, Not a member yet? Register   Sign In
Installing SSL for codeigniter
#9

(This post was last modified: 01-16-2024, 06:32 AM by lorsz.)

Hi,

I have installed SSL on my server.

In config.php file I changed $config['base_url'] = 'http://doc.example.com/'; to $config['base_url'] = 'https://doc.example.com/'; and $config['index_page'] = 'index.php'; to $config['index_page'] = ''; to remove index.php from URL.
Unfortunately URLs for HTTPS requests except of home page do not work properly. As a result URLs like https://doc.example.com/page1 return "page to found".
My .htaccess


Code:
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

Options -Indexes


I use CI v3.1.11.

Could someone please help me?

UPDATE
Setting AllowOverride All in apache2.conf solved the problem.
Reply


Messages In This Thread
Installing SSL for codeigniter - by rrashid090 - 04-08-2020, 09:40 AM
RE: Installing SSL for codeigniter - by jreklund - 04-08-2020, 09:47 AM
RE: Installing SSL for codeigniter - by jreklund - 04-17-2020, 12:46 PM
RE: Installing SSL for codeigniter - by jreklund - 04-20-2020, 09:14 AM
RE: Installing SSL for codeigniter - by lorsz - 11-07-2023, 06:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB