Привет всем Я новичок в MVC и после того, как попытка mod_rewrite У меня возникли проблемы с при попытке загрузить site/about
. У меня есть мой проект в основном корневом каталоге моего веб-сервера htdocs
, я изо всех сил пытался понять многие из обучающих онлайн. Ошибка;MVC код воспламенитель 403 Ошибки
Forbidden
You don't have permission to access/on this server.
Additionally, a 403 Forbidden error was encountered while
trying to use an ErrorDocument to handle the request.
сайт - Контроллер
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class Site extends CI_Controller {
public function index()
{
$data['title']= "Welcome Learn Guitar Online";
//$this->load->view('home',$data);
//$this->getValues();
$this->load->view("about",$data);
}
}
about.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><?php echo $title; ?></title>
</head>
<body>
<div id="container">
<h1>Welcome to about</h1>
<div id="body">
<p>hello</p>
</div>
<p class="footer">Page rendered in <strong>{elapsed_time}</strong> seconds</p>
</div>
</body>
</html>
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
переменные файла конфигурации
$config['base_url'] = 'localhost/index.php';
$config['index_page'] = '';