En fait, je crois que c'est toutes les pages "posts" qui ne fonctionnent pas. Dans ma page administration j'ai un lien pour modifier/ajouter/supprimer les articles et ça m'affiche la même chose: "Ce site est inaccessible".
Mon postController :
/**
* Permet d'afficher les posts d'une catégorie
**/
function category($slug){
$this->loadModel('Category');
$category = $this->Category->findFirst(array(
'conditions' => array('slug' => $slug),
'fields' => 'id,name'
));
if(empty($category)){
$this->e404();
}
$perPage = 10;
$this->loadModel('Post');
$condition = array('online' => 1,'type'=>'post','category_id' => $category->id);
$d['posts'] = $this->Post->find(array(
'conditions' => $condition,
'fields' => 'Post.id,Post.name,Post.slug,Post.created,Category.name as catname,Post.content,Category.slug as catslug',
'order' => 'created DESC',
'limit' => ($perPage*($this->request->page-1)).','.$perPage,
'join' => array('categories as Category'=>'Category.id=Post.category_id')
));
$d['total'] = $this->Post->findCount($condition);
$d['page'] = ceil($d['total'] / $perPage);
$d['title'] = 'Tous les articles "'.$category->name.'"';
$this->set($d);
// Le système est le même que la page index alors on rend la vue Index
$this->render('index');
}
/**
* Affiche un article en particulier
**/
function view($id,$slug){
$this->loadModel('Post');
$d['post'] = $this->Post->findFirst(array(
'fields' => 'Post.id,Post.content,Post.name,Post.slug,Category.name as catname,Category.slug as catslug',
'conditions' => array('Post.online' => 1,'Post.id'=>$id,'Post.type'=>'post'),
'join' => array('categories as Category'=>'Category.id=Post.category_id')
));
if(empty($d['post'])){
$this->e404('Page introuvable');
}
if($slug != $d['post']->slug){
$this->redirect("posts/view/id:$id/slug:".$d['post']->slug,301);
}
$this->set($d);
}