1

ホスト名を使用して mym プロジェクトのカスタム サブドメインを作成し、アプリケーション ロゴ ベースのサブ ドメインをロードします。_initRouter() 関数の bootstrap.php に以下のコードを追加しました。

  $hostnameRoute = new Zend_Controller_Router_Route_Hostname(
':subdomain.domain.com',
array(
    'controller' => 'user',
    'action'     => 'login'
)
);

   $plainPathRoute = new Zend_Controller_Router_Route_Static('');

   $router->addRoute('user', $hostnameRoute->chain($plainPathRoute));

htaccessファイルにも以下のコードがあります。

   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} -s [OR]
   RewriteCond %{REQUEST_FILENAME} -l [OR]
   RewriteCond %{REQUEST_FILENAME} -d
   RewriteRule ^.*$ - [NC,L]
   RewriteRule ^.*$ index.php [NC,L]

しかし、ログイン後に機能しません。

4

0 に答える 0