Welcome Guest, Not a member yet? Register   Sign In
404 Error on default controller
#1

I am using CI3 for a client's website.
After working on localhost under windows platform, the site is working fine.

Accessing the site on localhost as http://localhost/folder goes to the default controller page.

Transferring the files, setting database options online and trying access via http://domain.com/ results to a 404 error.
I can't even access the home page via http://domain.com/index.php.

What's working is http://domain.com/controller or http://domain.com/controller/function... or any option under routes, but not homepage.

My .htaccess:
Code:
<IfModule mod_rewrite.c>
  RewriteEngine on

#Rewrite URLs of the form 'x' to the form 'index.php?q=x'.

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

My routes:
PHP Code:
$route['default_controller']        = 'Main';
$route['404_override']              = '';
$route['translate_uri_dashes']      = TRUE;
$route['home/(:any)']               = $route['home/'] = $route['home'] = 'main/$1'

Kindly assist.

PS: I tested with CI2 and it works with the above options.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB