0

I enter this url on my browser :

localhost:8085/farabi/Fateme/index

I don't know why I get this error :

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster. Error 404

Fateme.php :

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Fateme extends CI_Controller {


    public function index()
    {
        $this->load->view('welcome_fateme');
    }
}

config.php :

$config['base_url'] = 'http://localhost:8085/farabi/';

$config['index_page'] = '';

my htaccess in root folder (/farabi):

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
F.Joodaki
  • 141
  • 3
  • 16

1 Answers1

0

Remove your htaccess and replace it with the below one

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

Also read this for more info https://stackoverflow.com/a/19197074/4481606

Community
  • 1
  • 1
Vivek Shah
  • 434
  • 3
  • 10