ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

creating admin panel

January 29, 2013 11:31am

Subscribe [2]
  • #1 / Jan 29, 2013 11:31am

    chaitanya

    2 posts

    Hi,
    I am new to CI and I want to create “Admin” panel for mysite.
    I have created an admin folder inside controller folder and I have login controller inside that(path is application/controller/admin/login.php) .I want to access my admin panel as localhost/mysite/admin
    I am getting

    The requested URL /mysite/admin was not found on this server.. while trying to access admin.

    I would like to know any settings/changes I will have to make in my config or routes file.

    Thanks ,
    Chaitanya

  • #2 / Jan 29, 2013 2:20pm

    Eduard Stankovic

    38 posts

    in your route file add this line

    $route['admin'] = "admin/login";

     

  • #3 / Jan 30, 2013 4:37am

    chaitanya

    2 posts

    Hi,
    I have tried that still getting the same.
    Any other way to achieve this?

    Thanks,
    Chaitanya

  • #4 / Jan 30, 2013 9:48am

    Eduard Stankovic

    38 posts

    what is code of your .htaccess file, route.php and login.php(controller)

  • #5 / Jan 30, 2013 2:00pm

    chaitanya

    2 posts

    Hi,

    I have .htaccess file in root folder.Do I need to add it in my admin folder.
    What changes should I make into my .htacess file.Currently it contains

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /

    RewriteRule ^(.*)$ index.php/$1 [L]
    RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
    RewriteRule ^index\.php(.+) $1 [R=301,L]

    route.php

    $route[‘default_controller’] = “welcome”;
    $route[‘404_override’] = ‘’;
    $route[‘admin’] = “admin/login”;


    login.php

    <?php if ( ! defined(‘BASEPATH’)) exit(‘No direct script access allowed’);

    class Login extends CI_Controller {

    function __construct()
    {
    parent::__construct();
    }

    function index()
    {
    $this->load->helper(array('form'));
    $this->load->view('login_view');
    }

    }

    ?>


    Thanks.

    .

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases