• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with routing to admin panel

#1
[eluser]Unknown[/eluser]
Hai everyone,

Iam new to codeigniter i used it it is really nice framework.

can anyone help me to route to admin area?

this is my folder structure

Quote:controllers/
admin/index.php
user/index.php

views/
admin/index.php
user/index.php

the user section is working fine

http://localhost/mysite/index.php

when i type http://localhost/mysite/admin

i got a error like this

The requested URL /mysite/admin was not found on this server.

this is my routes.php file code

Code:
$route['default_controller'] = "user/welcome";
$route['admin'] = "admin/login";

$route['admin/(.*)']         = 'admin/$1';
$route['admin']         = 'admin/login';
$route['(.*)']              = "admin/$1";  

$route['404_override'] = '';

my admin/index.php code is like this
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Admin extends CI_Controller  
{

    public function index()
    {
        
    }
    public function login()
    {
        $this->load->view('admin/index');
    }
}


Can any one please help me?

Arunkumar


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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