私はサブドメインwww.panel.example.comとドメインwww.example.comを持っています。Kohana 3.2ルーティングとサブドメインの問題
私のbootstrap.phpの:
<?php
Kohana::init(array(
'base_url' => '/',
'index_file' => FALSE,
));
Route::set('panel', '(<controller>(/<action>(/<id>)))', array('subdomain' => 'panel'))
->defaults(array(
'directory' => 'panel',
'controller' => 'panel',
'action' => 'index',
'subdomain' => 'panel',
));
Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
'controller' => 'home',
'action' => 'index',
));
?>
私はブラウザ上で住所を書いている:www.panel.example.com私はエラーを持っている:
HTTP_Exception_404 [ 404 ]: The requested URL/was not found on this server.
マイ構造:
アプリケーション/クラス/コントローラ(ドメインのコントローラ)
アプリケーション/クラス/コントローラ/パネル(conサブドメインのトローラー)
正しく行う方法は?
あなたはCpanelやPleskのようなホスティングソフトウェアを使用していますか? wyによって、 'www.panel.example.com'は' panel.example.com'ではありませんか? – yoda
私はDirectAdminソフトウェアを使ってサブドメインpanel.example.comを作成しました – witek010
'Kohana'には' subdomains'の組み込みメソッドはありませんが、 'bootstrap.php'でuriを読み込んで' subdomain'名'uri'を再ルーティングします。 – yoda