일부 경우 로그인 리디렉션을 구현하려고합니다. 내 웹 사이트에 로그인 한 사용자 전용 페이지처럼ZF2 : 매개 변수로 리디렉션 URL 전달
게스트 사용자가 그 페이지로 이동하면 게스트가 로그인 페이지로 리디렉션되고 나면 로그인 후 사용자가 동일한 페이지로 리디렉션하도록합니다.
내 로그인 모듈은 http://samsonasik.wordpress.com/2012/10/23/zend-framework-2-create-login-authentication-using-authenticationservice-with-rememberme/ 이며이 코드는 "application/auth"컨트롤러에 통합되어 있습니다.
내가이 URL을 사용하는 경우 : www.qa-staging.com/hemaa/auth/login/redirect/http%3A%2F%2Fgoogle.com
그것은 나에게 404 오류를 제공합니다.
www.qa-staging.com/hemaa/auth/login/redirect/ http://google.com 라우팅이 작동하지만 이것을 달성하는 것은 좋지 않다고 생각합니다.
컨트롤러 : 인증 작업을
:
PARAM2 리디렉션 :
PARAM1 로그인 URL이
'noModule' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller][/:action[/:param1[/:param2[/:param3]]]]',
'constraints' => array(
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'param1' => '[a-zA-Z0-9_-]*',
'param2' => '(.)+',
'param3' => '(.)+',
),
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Index',
'action' => 'index',
),
),
),
이 달성 할 수있는 방법 어떤 생각을 리디렉션?
Thanks @Wilt. 그것은 작동합니다. – user2794408