CodeIgniter Forums

Full Version: Default Controller doesnt work on base url.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

Just a little help, I already setup most of the things I need in CI 4.1.1. I'm mounting it on a cPanel hosting, and I've already managed to remove the index.php/public from the url. The only problem I can't seem to resolve is to load the default controller when visiting the base url of my application.

I already defined the base url and removed the indexPage on the Config/App.php as the documentation says.

PHP Code:
public $baseURL '';
$indexPage ''

And in my Config/Routes.php

PHP Code:

 * --------------------------------------------------------------------
 * Route Definitions
 * --------------------------------------------------------------------

// We get a performance increase by specifying the default
// route since we don't have to scan directories.
//$routes->get('/', 'Home::index'); 

So if I visit it doesn't load anything, while it loads the page correctly. (it does no difference if I uncomment the routes->get('/', 'Home::index'); line
I'm using a subfolder to separate admin from public page, and if I visit,it loads the home controller in the admin subfolder correctly so the configuration is working.
I'm using the default .htaccess provided in the CI folder on my root directory, I pulled it out of the public folder.

Am I missing a configuration or why doesn't it load nothing when visiting the base url?

Thanks in advance.
In your .htaccess file specify the subfolder by using RewriteBase /subfolder