Multi domain in CodeIgniter with http/https |
10-21-2016, 08:56 AM
(This post was last modified: 11-20-2018, 12:47 AM by ciadmin. Edit Reason: another link to the torrent site )
Hi all,
I have been used CI for 4 years. Today I will share my config for multi domain + http/https The environment: CI 2.x/3.x + nginx web server - In server side (nginx), you should config normal vhost for http/https (you can search with Google) - In Application side, file config.php PHP Code: if(isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') Now you can access your application with many domain: http://abc.com/ https://abc.com/ **SEO SPAM LINK REDACTED** http://xyz.com/ https://xyz.com/ And no need config any more in application side Hope all you like this topic |
Welcome Guest, Not a member yet? Register Sign In |