Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8692635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:21:16+00:00 2026-06-13T00:21:16+00:00

Recently installed a SSL Cert on our server/domain, and I am realizing now that

  • 0

Recently installed a SSL Cert on our server/domain, and I am realizing now that CI doesn’t like https:// seems like anything that works http:// gets a 404 in https:// so but I have some views/controllers that don’t require the whole https:// bit. Such as pages when a user is not logged in to the service I am building up, that are viewable. Only thing I have come up with is configuring the base_url in config.php, which won’t work that well for me either, as we have multiple environments where the service runs through before it reaches a public viewable area.

By that I mean we have our dev area where each one of our devs has a separate sub domain with there current dev stack, working on what they are working on. Then we have a staging and QA area, as well as a beta area all before it will reach production.

So I am looking for ideas on how to handle all of this, and short of the base_url config I have no idea where to begin to make this an easy to manage solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:21:17+00:00Added an answer on June 13, 2026 at 12:21 am

    I use a DEV, QA, and Production environment for my CodeIgniter site and all of them work fine with HTTPS. No special settings are required for HTTPS to work with it. Perhaps you could provide the URLs your are having trouble with?

    Below is how I manage multiple subdomains.

    In ‘/application/config/config.php’ set the base_url to auto-detect by leaving it empty:

    $config['base_url'] = '';
    

    I’m assuming your URLs are:

    • http://dev.yourdomain.com
    • http://qa.yourdomain.com
    • http://youdomain.com

    To manage different environments, open index.php in the root directory and add:

    // This sets the environment based on the subdomain
    $domain = explode('.', $_SERVER['HTTP_HOST']);
    switch($domain[0])
    {
        case 'dev':
            $env = 'dev';
                break;
            case 'qa':
            $env = 'qa';
                break;
        default:
            $env = 'production';
            break;                  
    }
    
    define('ENVIRONMENT', $env);
    
    // Error reporting
    if (defined('ENVIRONMENT'))
    {
        switch (ENVIRONMENT)
        {
            case 'dev':
                error_reporting(E_ALL);
                ini_set("display_errors", 1);
                break;          
            case 'qa':
                case 'production':
                error_reporting(0);
                break;
            case 'production':
                error_reporting(0);
                break;
            default:
                exit('The application environment is not set correctly.');
        }
    }
    

    If you have a database, setup’/application/config/database.php’ to:

    // Use the respective DB based on the domain name
    switch(ENVIRONMENT){
        case 'dev':
            $active_group = 'dev';
            break;
        case 'qa':
            $active_group = 'qa';
            break;
        default:
            $active_group = 'production';
        break;                  
    }
    
    // setup domain specific DB's
    $db['dev']['hostname'] = 'mysql.stabletransit.com';
    // etc..
    
    $db['qa']['hostname'] = 'mysql.stabletransit.com';
    // etc..
    
    $db['production']['hostname'] = 'mysql.stabletransit.com';
    // etc..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently installed Thin on our server. Now my customer asked me to implemet
I recently installed PHP APC on our server via our WHM panel (Web Host
I recently installed an SSL cert on one of my sites. I have noticed
Recently installed (and re-installed) VS 2012 Ultimate with Blend The VS Command Prompt doesn't
I recently installed CouchDB, but haven't gotten past the test suite yet. It seems
I recently installed the RTM version of 4.0. I now receive an error when
I recently installed MAMP version 1.6 on my MAC OS 10.5.7. Now I am
I recently installed PDT Helios and now when using the debugger, it will break
I recently installed silverlight 3 tools to my VS 2008 SP1 environment, now when
I recently installed VS08 SP1 so that I could use the Entity Framework. However,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.