class Ef_AppSecurity extends Zend_Controller_Plugin_Abstract
{
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
if (!Zend_Auth::getInstance()->getIdentity())
{
$redirect = new Zend_Controller_Action_Helper_Redirector();
$redirect->gotoSimpleAndExit('login', 'auth');
}
}
}
브라우저에서 새 URL로 리디렉션되고 변경되지만 리디렉션 루프가 생성됩니다. 문제가 아파치 mod_rewrite 설정에서 유래 할 수 있는지 궁금하네요.젠드 프레임 워크 프런트 컨트롤러 플러그인에서 리디렉션하면 리디렉션 루프가 발생합니다.
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
많은 감사합니다 chelmertz! – eforth
@ 도울 수있어서 기쁘다! 답을 "옳은 것"으로 표시하여 "케이스 폐쇄"를하도록하십시오. – chelmertz