Search code examples
.htaccesscodeigniterweb-hosting

codeigniter problem login through IE, Safari, Chrome?


Everything works fine in localhost but I have a problem login from other browsers like Safari and Chrome, in firefox it's okay. Maybe it is because of htaccess or may be other.

I tried a lot of searching but come to no solution. My htaccess file look like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /


RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

My server folder hierarchy looks like this:

public_html
L application
  system
  css
  images
  .htaccess

application/config/config.php looks like this

$config['index_page'] = "index.php?";
$config['uri_protocol'] = 'QUERY_STRING';

I have used hmvc too. Any help?


Solution

  • Have you updated the base_url variable in your config file to reflect the new server?