Newly installed CI, can't access home controller? |
[eluser]solid9[/eluser]
Hi I've just installed CI in my website. The welcome page is displaying properly. I installed it in a specific folder mysite.com/pies/ Now I created a controller namely home.php When I tried to access it, it display this error below, Code: Not Found Also these are the codes for the controller home.php Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); What could be I'm missing here?
[eluser]meigwilym[/eluser]
You need to put /home/ in the url. /pies/home/ would look for the pies controller's home method. (This is, of course, assuming that you've installed CI in the root, and not in the /pies directory. Mei
[eluser]solid9[/eluser]
I installed it in the /pies/ directory. So what's the right path? /pies/ is the sub folder where CI is installed. /home/ is the name of the controller. /coco/ is the method. I wrote something like this below, http://mysite.com/pies/home/coco/ BUt the error is still the same. What could be the reason? Thanks in advanced.
[eluser]solid9[/eluser]
here is the updated home controller, Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
[eluser]Matalina[/eluser]
Is your index.php removed by .htaccess? and not in the config file?
[eluser]solid9[/eluser]
@matalina What do you mean by .htaccess file? I don't use it. I use the latest version, I just uploaded everything into my website.
[eluser]CroNiX[/eluser]
You can't remove index.php from the url without using an htaccess file and mod_rewrite. Try going to http://yoursite.com/pies/index.php/home To remove the index.php from the url with htaccess, read http://ellislab.com/codeigniter/user-gui.../urls.html |
Welcome Guest, Not a member yet? Register Sign In |