![]() |
403 error access denied - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: 403 error access denied (/showthread.php?tid=62597) |
403 error access denied - axelvdk - 08-03-2015 Hi everyone ! I'm a beginer with codeigniter and I have a problem with an 403 error : You don't have permission to access /b-best/application/controllers/InscriptionController.php on this server. Actually, my default view (homePage.php) is working, I can display it but the problem is on a link. In my HomePageView.php I have <a href="InscriptionController.php"> Subscription </a> and in this controller I load the view like this : $this->load->view('RegistrationView.php'); The 403 error happens now. I don't know what I have to do. My config file is ok, my $config['base_url'] is 'http://localhost/b-best/'; my $route['default_controller'] is the HomeController.php and my database.php is correctly configurated. If you have any idea about what to do, it would be really helpfull to tell it to me. Axel RE: 403 error access denied - Hobbes - 08-04-2015 change: <a href="InscriptionController.php"> Subscription </a> to: <a href="<?php echo site_url('inscriptioncontroller'); ?>"> Subscription </a> RE: 403 error access denied - axelvdk - 08-04-2015 Waw !!! It works ! Thank you so much man ! 4 days lost at that job ! Thanks to you it's fixed, thank you a lot ! Axel RE: 403 error access denied - Hobbes - 08-05-2015 glad to be of help ![]() RE: 403 error access denied - Wouter60 - 08-05-2015 The following is even more CI compliant: PHP Code: <?= anchor('inscriptioncontroller','Subscription');?> It requires loading the url helper, but it's good practice to do that by default in autoload.php. <?= is short for <?php echo |