0
https를 symfony 1.4 프로젝트에 할당해야합니다. 내가 바꿔야 할 유일한 것은 htaccess이거나 필터 등에 뭔가를 써야 할 것입니까?Symfony 1.4 https
나는 htaccess로 이것을하려고했지만 아무런 결과가 없기 때문에 물었다.
https를 symfony 1.4 프로젝트에 할당해야합니다. 내가 바꿔야 할 유일한 것은 htaccess이거나 필터 등에 뭔가를 써야 할 것입니까?Symfony 1.4 https
나는 htaccess로 이것을하려고했지만 아무런 결과가 없기 때문에 물었다.
이
class sfSecureFilter extends sfFilter
{
public function execute($filterChain)
{
$context = $this->getContext();
$request = $context->getRequest();
if (!$request->isSecure())
{
$secure_url = str_replace('http', 'https', $request->getUri());
return $context->getController()->redirect($secure_url);
}
else
{
$filterChain->execute();
}
}
}
처럼, 그것을 할 필터를 사용할 수 있습니다