2014-12-29 3 views
0

Это, локальной работает на моем WAMP сервера, но когда я пытался использовать его на моем хосте он всегда получает ошибку:Fatfree Framework Ошибка 404 на каждом маршруте

HTTP 404 (GET /) 

• teste/index.php:17 Base->run() 

Вы можете увидеть здесь ошибку: http://rafaelmsantos.com/teste/

У меня нет понятия, что происходит, я пробовал использовать другой .htaccess, но он всегда показывает ту же ошибку.

.htaccess

# Enable rewrite engine and route requests to framework 
RewriteEngine On 

# Some servers require you to specify the `RewriteBase` directive 
# In such cases, it should be the path (relative to the document root) 
# containing this .htaccess file 
# 
# RewriteBase/

RewriteRule ^(lib|tmp)\/|\.(ini)$ - [R=404] 

RewriteCond %{REQUEST_FILENAME} !-l 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* index.php [L,QSA] 
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] 

config.ini

[globals] 

AUTOLOAD=public/pages/ 

DB.dns="mysql:host=localhost; dbname=lod; port=3306;" 
DB.user="root" 
DB.password="" 

DEBUG=3 
UI=assets/ 

index.php

<?php 

$lod = require('lib/base.php'); 
$lod->config('config.ini'); 


// HELPERS DEVELOPED BY ME 
require_once 'helpers/base_helper.php'; 

//*-----------------------------------------------------------------*/ 
//*        PÁGINAS        */ 
//*-----------------------------------------------------------------*/ 
$lod->route('GET /', 'PagesController->index'); 
$lod->route('GET /project/@page', 'PagesController->index'); 


$lod->run(); 

И моя структура папок:

Print Screen of folder structure

ответ

0

Оказывается, я должен был автозагрузку по-другому,

insted AUTOLOAD=public/pages/ на config.ini, мне пришлось использовать $lod->set('AUTOLOAD','public/pages/'); после require_once и до маршрутов.

1

пытаются установить RewriteBase в вашем .htaccess (как комментарий выше сказал):

RewriteBase /teste/ 
+0

Ничего не изменилось: S – rafamds

Смежные вопросы