3

i changed my controller name from controller.php to Controller.php also changed my base_url in config file to the directory where my website is hosted like www.abc.com/websitefolder but still i am getting 404 error website url : www.cyfers.com/moving/

my base_url : $config['base_url'] = 'http://www.cyfers.com/moving/';

my .htaccess code

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

enter image description here

7

1 Answer 1

6

Your Base URL should be

$config['base_url'] = 'http://cyfers.com/moving/';

In htaccss

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Your Controller file should be dashboard.php.

And default controller should be $route['default_controller'] = "dashboard";


To hide errors on site in root there is file call index.php

Change this to

define('ENVIRONMENT', 'development');

this

define('ENVIRONMENT', 'production');
16
  • yes its already there .. i mentioned in my edited answer .. still same issue RewriteEngine on RewriteBase / RewriteCond $1 !^(index.php|resources|robots.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] Commented Feb 1, 2016 at 22:57
  • change your base url and upload project Commented Feb 1, 2016 at 22:58
  • i changed .. but still same Commented Feb 1, 2016 at 22:59
  • Now add my htaccess too Commented Feb 1, 2016 at 23:00
  • shoe me Dashboard file name and class name Commented Feb 1, 2016 at 23:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.