Show the redirect details page.

@param  \Arcanesoft\Seo\Models\Redirect  $redirect

@return \Illuminate\View\View
192267
public function show(Redirect $redirect)
    {
        $this->authorize(RedirectsPolicy::PERMISSION_SHOW);

        $this->setTitle($title = trans('seo::redirects.titles.redirection-details'));
        $this->addBreadcrumb($title);

        return $this->view('admin.redirects.show', compact('redirect'));
    }
688743
public function getLogoutUrl ($redirectTo = null)
		{
			if (empty($redirectTo))
				return $this->_logoutUrl;
			else
				return $this->_logoutUrl . '?next=' . urlencode($redirectTo);
		}
922239
protected function getRedirect() : Redirect
    {
        $context = Context::getInstance();
        $redirect = new Redirect($context->getUrl($context->getParameter('controller_path')));
        return $redirect;
    }
274678
protected function redirectUserTo(string $namespace, string $path, ?string $redirect = null): string
    {
        return \handles($this->redirectUserPath($namespace, $path, $redirect));
    }
1241935
public static function temporaryRedirect($url, $externalRedirect = false) {
		/** @var Response $response */
		$response = new static();
		$response->redirect($url, $externalRedirect, self::HTTP_TEMPORARY_REDIRECT);
		return $response;
	}
1038827
public function redirect() : ?RedirectResponse
    {
        if (!$this->enabled()) {
            return null;
        }

        return redirect()
            ->back()
            ->withErrors([
                'form-verify-error' => $this->redirectMessage,
            ])
            ->withInput();
    }
1142023
public function setRedirectUrl($redirectUrl)
    {
        if (!empty($redirectUrl) && ctype_print($redirectUrl)) {
            $this->redirectUrl = trim($redirectUrl);
        }

        return $this;
    }
245038
public function AutoToggle($Sender, $Redirect = NULL) {
      $PluginName = $this->GetPluginIndex();
      $EnabledKey = "Plugins.{$PluginName}.Enabled";
      $CurrentConfig = C($EnabledKey, FALSE);
      $PassedKey = GetValue(1, $Sender->RequestArgs);
      
      if ($Sender->Form->AuthenticatedPostBack() || Gdn::Session()->ValidateTransientKey($PassedKey)) {
         $CurrentConfig = !$CurrentConfig;
         SaveToConfig($EnabledKey, $CurrentConfig);
      }
      
      if ($Sender->Form->AuthenticatedPostBack())
         $this->Controller_Index($Sender);
      else {
         if ($Redirect === FALSE) return $CurrentConfig;
         if (is_null($Redirect))
            Redirect('plugin/'.strtolower($PluginName));
         else
            Redirect($Redirect);
      }            
      return $CurrentConfig;
   }
953955
private function getIndexRedirectionResponse()
    {
        $response = new Redirection($this->getRequest());
        $url = sprintf('/%s/', $this->getCollectionName());
        // If a particular view was being shown, honour it.
        $view = $this->getRequest()->getParameter('view');
        if (!empty($view)) {
            $url .= '?view=' . $view;
        }
        $response->setNextUrl($url);

        return $response;
    }
1054173
public function update(Redirect &$redirect)
    {
        $endpoint = '/admin/redirects/'.$redirect->id.'.json';
        $data = $redirect->exportData();
        $response = $this->request(
            $endpoint, "POST", array(
            'redirect' => $data
            )
        );
        $redirect->setData($response['redirect']);
    }
831798
public function createOrUpdateForRedirection(RedirectionInterface $redirection)
    {
        $site = $this->siteRepository->findOneBySiteId($redirection->getSiteId());

        return $this->generateRoutesForRedirection($redirection, $site);
    }
774799
public function save(
        RedirectEntity $redirect
    ) {
        /** @var \Rcm\Entity\Redirect $result */
        $result = $this->findOneBy(
            [
                'requestUrl' => $redirect->getRequestUrl(),
                'redirectUrl' => $redirect->getRedirectUrl(),
                'siteId' => $redirect->getSiteId(),
            ]
        );

        if (!empty($result) && $result->getRedirectId() !== $redirect->getRedirectId()) {
            throw new RedirectException('Duplicate redirects not allowed');
        }

        if ($redirect->getSiteId() !== null) {
            $siteRepo = $this->getEntityManager()->getRepository(
                \Rcm\Entity\Site::class
            );

            $site = $siteRepo->find($redirect->getSiteId());

            if (empty($site)) {
                throw new RedirectException('Valid site required');
            }
            $redirect->setSite($site);
        }

        $this->getEntityManager()->persist($redirect);
        $this->getEntityManager()->flush($redirect);
    }
292665
public function redirect($url)
    {
        $location = $this->_request->getBasePath();
        $location = str_replace('//', '/', "{$location}/{$url}");
        $this->_response->setStatusCode(302);
        $header = new GenericHeader('Location', $location);
        $this->_response->getHeaders()->addHeader($header);
        return $this->disableRendering();
    }
456416
public function redirect($url, $autoRedirect = true)
    {
        if (!$this->config->getShopNumber()) {
            return '';
        }

        $url .= $this->processQueryString($url);

        if (
            !$this->isRedirectAllowed() || !$this->isMobileRequest() ||
            !$autoRedirect || (($this->redirectType == 'default') && !$this->enableDefaultRedirect)
        ) {
            return $this->getJsHeader($url);
        }

        // validate url
        if (!preg_match('#^(http|https)\://#', $url)) {
            return $this->getJsHeader();
        }

        // perform redirect
        header("Location: " . $url, true, 301);
        exit;
    }
432059
protected function getRedirectRoute(Request $request, $url)
    {
        // redirect to linked page
        return new Route(
            $this->decodePathInfo($request->getPathInfo()),
            [
                '_controller' => 'SuluWebsiteBundle:Redirect:redirect',
                'url' => $url,
            ]
        );
    }
1330954
public function redirectToRoute()
    {
        if ($this->getRequest()
                 ->isXmlHttpRequest()) {
            return [
                'redirect' => call_user_func_array(
                    [
                        $this->url(),
                        'fromRoute',
                    ],
                    func_get_args()
                ),
            ];
        }

        return call_user_func_array(
            [
                $this->redirect(),
                'toRoute',
            ],
            func_get_args()
        );
    }
1225194
public function update(Redirect $redirect, UpdateRedirectRequest $request)
    {
        $this->authorize(RedirectsPolicy::PERMISSION_UPDATE);

        $redirect->update($request->getValidatedData());

        $this->transNotification('updated', [], $redirect->toArray());

        return redirect()->route('admin::seo.redirects.show', [$redirect]);
    }