index.php is not removing while i use https but it works for http. What I need to do is my site work properly such as it works on http and https both. Anybody faced same issue help me to fix this.
Ex: In http
- http://xyz.mydomain.com/users/login //works fine
- http://xyz.mydomain.com/index.php/users/login //works fine
IN https
1) https://xyz.mydomain.com/users/login // 404 page not found
2) https://xyz.mydomain.com/index.php/users/login // works fine
MY htaccess code
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
config.php My base url is set as
$root=(isset($_SERVER['HTTPS']) ? "https://" : "http://").$_SERVER['HTTP_HOST'];
$root.= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
$config['base_url'] = $root;
$config['index_page'] = '';to remove the index.php inclusion in the first place?$config['base_url']is set to after you do all of that. something likeprint_r($config['base_url']); exit;$config['base_url']in all 4 of your test cases?AllowOveridepermissions . Check with your provider or system administrator. This is a server setting issue. The .htaccess is fine. You can also move the mod rewrite to the vhost.conf and ssl.conf.