Fix trailing slash removing on installation

This commit is contained in:
Dmitriy Simushev 2014-11-11 10:49:13 +00:00
parent f5470239e4
commit bcbb02f52f

View File

@ -20,11 +20,12 @@
namespace Mibew\Controller; namespace Mibew\Controller;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
/** /**
* Process all system level redirect actions. * Process all system level redirect actions.
*/ */
class RedirectController extends AbstractController class RedirectController
{ {
/** /**
* Redirect a user to the URL without trailing slash with 301 HTTP code. * Redirect a user to the URL without trailing slash with 301 HTTP code.
@ -38,6 +39,6 @@ class RedirectController extends AbstractController
$request_uri = $request->getRequestUri(); $request_uri = $request->getRequestUri();
$url = str_replace($path_info, rtrim($path_info, ' /'), $request_uri); $url = str_replace($path_info, rtrim($path_info, ' /'), $request_uri);
return $this->redirect($url, 301); return new RedirectResponse($url, 301);
} }
} }