How to redirect http to https in codeigniter
<p><strong>Point #1</strong>
If I type:</p>

<pre><code>www.myurl.com/somepage
http://www.myurl.com/somepage
http://myurl.com/somepage
https://myurl.com/somepage
</code></pre>

<p>have it redirect to</p>

<pre><code>https://www.myurl.com/somepage
</code></pre>

<p><strong>Point #2</strong></p>

<pre><code>When I type in something like www.myurl.com it is redirecting to https://www.myurl.com/index.php.
Make it so the index.php is not displaying. It should just display https://www.myurl.com
</code></pre>

<p>From Comment htaccess</p>

<pre><code>RewriteEngine On 
RewriteCond %{HTTP_HOST} ^myhost\.com$ [NC] 
RewriteRule ^(.*)$ myhost.com/$1 [R=301,L] 
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /index\.php(/[^\ ]*)?\ HTTP/ 
RewriteRule ^index\.php(/(.*))?$ myhost.com/$2 [R=301,L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php/$1 [L] 
</code></pre>