user2783193
user2783193

Reputation: 1022

controller doesn't return view on codeigniter

I'm trying to setup code igniter. directory structure is

since application and system are outside of public_html I setup variables inside public_html/index.php

$system_path = '../system'; 

and

$application_folder = '../application';

also inside application/config/routes default controller is set to my home controller

$route['default_controller'] = "home";

Now when I point to www.mysite.com/index.php controller returns view (from my default home controller) correctly as it should, but I cannot access to this view using www.mysite.com/home

Why is that ?

Upvotes: 0

Views: 150

Answers (1)

Matthew Daly
Matthew Daly

Reputation: 9476

You need to amend your htaccess file to strip out index.php in order to be able to access it at www.mysite.com/home. You also need to set the value of index_page to '' in the config file.

Take a look at the CodeIgniter documentation on URLs for an example of how to do this.

Upvotes: 3

Related Questions