• Web 2.0 platform and Programming Language

    We are promoting Web 2.0 platform in our template design, xHTML in our scripting and PHP programming language in our server side programming. So try our services and be satisfied with the outcome.

  • HTML/xHTML Standard

    This site passed and uses the W3C XHTML 1.0 Transitional standard, CSS level 2.1 driven, Javascript and with a latest trend of Table-less xHTML scripting by not using <table> tag in making our script.

  • Website History

    This website was founded last October 18, 2007, fully bought the domain February 2008 and has been continually updating. We are located at heart of The City of Golden Friendship Cagayan de Oro the City.

Configuring CodeIgniter for website with HTTPS protocol

Do you have problem what to do if your website is going to be SSL and will be having HTTPS protocol and you are using CodeIgniter?
Well the answer this, at Configuration file of CodeIgniter, do this:
system\application\config\config.php
Instead of the usual

$config['base_url'] = 'http://www.mydomain.com';

Do this below:

$config['base_url'] = (isset($_SERVER['HTTPS']) ? 'https://' : 'http://') . $_SERVER['HTTP_HOST'];

Also if you want that even if users visit your site using HTTP protocol like http://www.mydomain.com,
it should redirect to HTTPS (https://www.mydomain.com), add the code below to your .htaccess file.

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

.htaccess example:

RewriteEngine On
RewriteBase /

RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Back to list 3 Comments Jan 05, 12 at 11:27 am

3 Responses to Configuring CodeIgniter for website with HTTPS protocol

  1. 5 Panel Drug Test says:

    Point the Way…

    If you would just pilot me in the right route, it could be wonderful, thanks mucho….

  2. dirotralin says:

    Visitor recommendations…

    [...]one of our visitors recently recommended the following website[...]……

  3. Server says:

    abscises…

    What about “a collection of oldies..but goldies” ?…

Leave a Reply

Your email address will not be published. Required fields are marked *

*


− 1 = seven

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

My Blogs

  • Configuring CodeIgniter for website with HTTPS protocol view more...
    Posted: Jan 05, 12 at 11:27 am
  • Keyword “Cagayan de Oro PHP Programmer” iWebProvider.com is Number 1 at Google Search view more...
    Posted: Feb 15, 11 at 05:54 pm
  • PHP get root URL and root Directory path view more...
    Posted: Feb 15, 11 at 02:47 am
  • PHP Object Oriented Programming (OOP) using Model View Controller (MVC) approach view more...
    Posted: Feb 12, 11 at 01:56 pm
  • Launching of the new 2011 iWebProvider.com Template Design view more...
    Posted: Feb 03, 11 at 08:17 pm

Most Popular Blogs

  • PHP get root URL and root Directory path view more...
    Posted: Feb 15, 11 at 02:47 am
  • Search Engine Friendly URL to convert .php and replace with .html file extension using .htaccess view more...
    Posted: Jan 19, 11 at 09:44 am
  • PHP Class for sending Email and preventing Email Spam view more...
    Posted: Jan 19, 11 at 09:41 am
  • PHP Function to Limit String output or display view more...
    Posted: Jan 19, 11 at 09:39 am

Wise Words

"Hard work surpasses genius"

by: Mark

"It’s not about how many you have learned but how much you have utilized and mastered what you have learned."

by: Mark

"The function of good software is to make the complex appear to be simple."

by: Grady Booch

Latest Comments

abseiled... The best post I ever found that captured all the arguments around heading syntax was he...

by: Server

ablution... Every convenience brings its own inconveniences along with it....

by: VPS

abscises... What about "a collection of oldies..but goldies" ?...

by: Server

Keep in Touch

If you would like to find out more about us, just email us at inquiry[AT]iwebprovider.com