CodeIgniter: How to remove index.php from url when using HTTPS and AWS CodeIgniter: How to remove index.php from url when using HTTPS and AWS codeigniter codeigniter

CodeIgniter: How to remove index.php from url when using HTTPS and AWS


Adding the following two lines above RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] resolved the issue

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]


create a file in your project folder named " .htaccess "then type this

RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php/$1 [L]

then go to application > config > config.php

$config['base_url'] = 'http://localhost/project_name/';/*|--------------------------------------------------------------------------| Index File|--------------------------------------------------------------------------|| Typically this will be your index.php file, unless you've renamed it to| something else. If you are using mod_rewrite to remove the page set this| variable so that it is blank.|*/$config['index_page'] = '';

make it like this