我正在尝试将功能性 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。什么我失踪了吗?