Ive read the guide on routing and URI views, and something doesn't click with me.
In my views folder, I have a subfolder called products. There is a product_view file in the file. In my controller, I have:
function index() {
$data['title'] = 'Product Overview';
$data['main_content'] = 'products/product_view';
$this->load->view('templates/main.php', $data);
}
The template loads the header view, footer view and navigation view, as well as the view as the main content variable.
In my routing URI, I have:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$route['default_controller'] = "index_controller";
$route['laser-configurator'] = "configurator";
$route['news-and-events'] = "news";
$route['products/product-overview'] = "products/product_view";
$route['scaffolding_trigger'] = "";
This causes a 404 error when I try to go to domain.com/products/product-overview. Do I need to do something with my .htaccess? If yes, then? Here is my .htaccess:
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
Id , . Ive , Im , .