• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help to load the page

I am developing a website for my company and I am struck in making the app run. I am able to see only the home page when I type in the URL http://localhost/codeigniter

For instance, when I type in http://localhost/CodeIgniter/admin/login/ the page is not loading up and displays an error message.

"Not Found

The requested URL /CodeIgniter/admin/login/ was not found on this server."

Please find the directory structure of my app below:

I am reading the files from a separate folder called as modules and modified the path accordingly in the libraries folder.

The following is the base site URL that I have set:
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

Please help me out in this regard. I have the entire code ready but the links are not showing up appropriately!


By default this is how it works.

You have your upload dir, lets pretend you upload it in the root folder.

To access the home page you go


or if it's uploaded in a codeigniter folder


If you want to go to another page(controller)

You go

The file path for the controller would be:

Here is an example Controller for login:


class Login extends Controller

  function Login()
    $this->load->helper('form'); // I have it set to load in all controllers, so I don't load things unless I need them

  function index()
    // This is the default method for what happens when you load a controller
    $this->load->view('home'); // This will load the file home.php in the folder called views

  function retrieve()

    $this->load->view('retrieve'); // Loads the file retrieve.php in folder called views
    // You can also go $this->load->view('login/retrieve'); That would call the folder 'login' and get the file called retrieve



I hope you get the picture on how it works. In order to use the function 'retrieve' you'd go:

If you have any other questions just ask!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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