0

I tried to use the .htaccess file to make the index.php disappear from the URL. Here is my current .htaccess file :

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|image|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L,QSA]
</IfModule>

I used the site_url() function to load my page like this :

<li><a href="<?php echo site_url('/welcome/corporate') ;?>"><div>Home - Corporate</div></a>

And I am having this issue :

The requested URL /mysite/welcome/corporate was not found on this server.

In the Welcome.php file, I have a function called corporate :

public function corporate() {
    $this->load->view('index-corporate.php');
}

I changed the config file already like this :

$config['index_page'] = '';

I feel like my problem is basic but can't find a way to solve it !

Thanks for your help

1 Answers1

0

Thanks, my problem was coming from my controller name : I forgot the capital letter at the begining (welcome instead of Welcome)