![]() |
Installing SSL for codeigniter - 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: Installing SSL for codeigniter (/showthread.php?tid=76031) |
Installing SSL for codeigniter - rrashid090 - 04-08-2020 Dear All, I have just installed SSL for my site. and put following in htaccess for redirection. RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://example.com/$1 [R=301,L] Now home page is working fine, but when i tried to open Admin Page or any other page it gives 404 error. then i removed above code from htaccess and try open manually by writing **redacted**, then its working absolutely fine for all pages. Please guide me accordingly. Thanks RE: Installing SSL for codeigniter - jreklund - 04-08-2020 Hi, try the following instead. Code: <IfModule mod_rewrite.c> RE: Installing SSL for codeigniter - dave friend - 04-09-2020 Make sure that $config['base_url'] is using the https protocol, for example PHP Code: $config['base_url'] = 'https://example.com/'; RE: Installing SSL for codeigniter - rrashid090 - 04-15-2020 I did the same as above provided instructions. but same error. as home page is working fine but all other pages showing 404 error. RE: Installing SSL for codeigniter - jreklund - 04-17-2020 404 errors should not be due to SSL, does them work without HTTPS? RE: Installing SSL for codeigniter - rrashid090 - 04-20-2020 (04-17-2020, 12:46 PM)jreklund Wrote: 404 errors should not be due to SSL, does them work without HTTPS? Yes site is working will without https. even if i addressed manually type site name with "https" then site working well. but if i made a change in htaccess file then error is coming only . RE: Installing SSL for codeigniter - jreklund - 04-20-2020 Can you post your complete .htaccess, to see if you have multiple entries of the same thing. RE: Installing SSL for codeigniter - rrashid090 - 04-20-2020 (04-20-2020, 09:14 AM)jreklund Wrote: Can you post your complete .htaccess, to see if you have multiple entries of the same thing.below you can htaccess file code for **redacted** Code: ## EXPIRES CACHING ## RE: Installing SSL for codeigniter - lorsz - 11-07-2023 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> I use CI v3.1.11. Could someone please help me? UPDATE Setting AllowOverride All in apache2.conf solved the problem. |