mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-10 09:50:12 +03:00
Fix trailing slash removing on installation
This commit is contained in:
parent
f5470239e4
commit
bcbb02f52f
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user