機能する ZF アプリケーションを SSL を使用するように変換しようとしています。証明書は有効で機能していますが、アプリケーションの構成に問題があります。
.htaccess の内容は次のとおりです。
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
SetEnv APPLICATION_ENV development
IndexController は実にシンプルです。
class IndexController extends Zend_Controller_Action
{
public function indexAction() {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$this->_helper->redirector('index', 'dash');
} else {
$this->_helper->redirector('index', 'auth');
}
}
}
https またはポートを指定せずにサイトを参照すると、正確に https://app-url.com にルーティングされますが、その後 https://app-url.com/authにリダイレクトしようとして403 が返されます。私は行方不明ですか?