Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

Backend documentation and general review is needed.

There is Router class with match method, which checks if there is a match for given url.

If not - nothing happens, if there is - url is redirect to given target

vendor/creativestyle/magesuite-url-rewrite/Controller/Router.php:39

Code Block
public function match(\Magento\Framework\App\RequestInterface $request)
{
    $server = $request->getServer();

    $requestUri = $server->get('ORIGINAL_URI') ? $server->get('ORIGINAL_URI') : $request->getRequestUri();
    .....

    $rewrite = $this->rewriteRepository->getRewrite($requestUri);
    if($rewrite == null) {
        return null;
    }

    $this->response->setRedirect($rewrite->getTargetUrl());
    $this->response->setStatusCode($rewrite->getStatusCode());
    .....
}

Frontend

There is no frontend part to document.