• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error404 when trying to access another controller

#1
Information 
Hi guys. need help. I've uploaded my codeigniter project on a free webhost site. when i run it seems to be okay but when i try to access my other controller it says that error 404

when i developed it offline running using xampp the url works fine:

Code:
http://localhost/ciblog/index.php/pages/index


and so this one

Code:
http://localhost/ciblog/index.php/admincontroller/index


but when i type this one

Code:
http://freedomain.somefreedomain.com/index.php/admincontroller/index/


i encountered error404

in my Controller Folder i have 2 Controllers
Pages.php = Which is basically the "FrontEnd"
AdminController.php = Which is basically the "BackEnd" or the administration

htaccess
Code:
RewriteEngine on
RewriteBase /
RewriteRule ^(application|system|\.svn) index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

here is my routes:
PHP Code:
$route['default_controller'] = 'pages';
$route['404_override'] = '';
$route['pages/index']='pages/index';
$route['pages/(:any)']='pages/$1';
$route['admincontroller']='admincontroller';
$route['admincontroller/login'] = 'admincontroller/login';
$route['admincontroller/index'] = 'admincontroller/index';
$route['admincontroller/posts'] ='admincontroller/posts';
$route['admincontroller/pages'] ='admincontroller/pages';
$route['admincontroller/addpage'] ='admincontroller/addpage';
$route['admincontroller/dashboard'] = 'admincontroller/dashboard'

Below is the Screenshot of the URL that works using offline/localhost


Attached Files Thumbnail(s)
   
Neko CMS - A free Simple CMS! developed using CodeIgniter
Novi
Software Developer / Web Developer
Reply

#2
You spelt admin wrong:


http://freedomain.somefreedomain.com/ind...ler/index/

admimcontroller is spelt wrong.
Practical guide to IgnitedCMS - Book coming soon
Reply

#3
(10-14-2015, 03:20 PM)iamthwee Wrote: You spelt admin wrong:


http://freedomain.somefreedomain.com/ind...ler/index/

admimcontroller is spelt wrong.

sorry i typed it wrong here. But still i didn't resolve the issue Sad
Neko CMS - A free Simple CMS! developed using CodeIgniter
Novi
Software Developer / Web Developer
Reply

#4
Do you know if the free site supports mod rewrite. free sites are notorious for being restrictive.
Practical guide to IgnitedCMS - Book coming soon
Reply

#5
(10-14-2015, 11:30 PM)iamthwee Wrote: Do you know if the free site supports mod rewrite. free sites are notorious for being restrictive.

Hi thanks for the help. I already solve it . The problem was the Name of the controller instead of AdminController i renamed it to Admincontroller . Just found the fix in stackoverflow. Thanks iamthwee for your help Smile
Neko CMS - A free Simple CMS! developed using CodeIgniter
Novi
Software Developer / Web Developer
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.