Get the edit page.

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

@return \Illuminate\View\View
2382
public function edit(Redirect $redirect)
    {
        $this->authorize(RedirectsPolicy::PERMISSION_UPDATE);

        $statuses = RedirectStatuses::all();

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

        return $this->view('admin.redirects.edit', compact('redirect', 'statuses'));
    }
770151
private function isWildcardRedirect(Redirect $redirect)
    {
        $origin = $redirect->getOrigin();
        $matchSegment = substr($origin, 0, -1);
        if (substr($origin, -2) == '/*') {
            return $this->isPathInfoWildcardMatch($matchSegment);
        }

        return false;
    }
140954
protected function forceRedirect($redirectTo = '')
    {
        if (empty($redirectTo))
        {
            $this->runDefaultBehavior();
        }

        Craft::$app->response->redirect($redirectTo, $this->settings->redirectStatusCode);
    }
585632
public function delete(Redirect $redirect)
    {
        $endpoint = '/admin/redirect/'.$redirect->id.'.json';
        $response = $this->request($endpoint, 'DELETE');
        return;
    }
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']);
    }
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;
   }
548548
public function editAction(Repo $repo = null)
    {
        if (!$repo) {
            return new RedirectResponse($this->generateUrl('snide_travinizer_dashboard'));
        }
        $form = $this->getForm($repo);
        return array(
            'form' => $form->createView(),
            'repo' => $repo,
            'slug' => $repo->getSlug(),
            'errors' => array()
        );
    }
364959
public function setRedirect($redirect) {
        if (!is_bool($redirect)) throw new IllegalTypeException('Illegal type of parameter $redirect: '.gettype($redirect));

        $this->redirect = $redirect;
        return $this;
    }
1088288
public function getRedirect()
    {
        if (!$this->isRedirect())
            return null;

        if ($this->isPermanentRedirect())
            return substr($this->name, 19);

        return substr($this->name, 9);
    }
980409
public function getRedirectUrl()
    {
        $siteId = $this->getSiteId();

        $requestUrl = $this->getRequestUrl();

        $redirect = $this->redirectRepo->getRedirect($requestUrl, $siteId);

        if (!empty($redirect)) {
            return $redirect->getRedirectUrl();
        }

        return null;
    }
213806
public function redirectUrl()
    {
        $redirectUrl = $this->getView()->getRequest()->getQuery('_redirect_url');
        $redirectUrlViewVar = $this->getViewVar('_redirect_url');

        if (!empty($redirectUrlViewVar)) {
            $redirectUrl = $redirectUrlViewVar;
        } else {
            $context = $this->Form->context();
            if ($context->val('_redirect_url')) {
                $redirectUrl = $context->val('_redirect_url');
            }
        }

        if (empty($redirectUrl)) {
            return null;
        }

        return $this->Form->hidden('_redirect_url', [
            'name' => '_redirect_url',
            'value' => $redirectUrl,
            'id' => null,
            'secure' => FormHelper::SECURE_SKIP
        ]);
    }
1205975
public function getLogin()
    {
        if ($this->guard()->check()) {
            return redirect($this->redirectPath());
        }

        return view($this->loginView);
    }
111394
public function editAction()
    {
        $id = $this->params()->fromRoute('id');
        if (! is_numeric($id)) {
            $this->flashMessenger()->addMessage(
                $this->scTranslate('The article identifier was not specified.')
            );
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        try {
            $article = $this->getArticleService()->getArticle($id);
        } catch (RuntimeException $e) {
            $this->flashMessenger()->addMessage($e->getMessage());
            return $this->redirect()
                ->toRoute('sc-admin/content-manager')
                ->setStatusCode(303);
        }

        $form = $this->getArticleForm();
        $form->setAttribute(
            'action',
            $this->url()->fromRoute('sc-admin/article/edit', ['id' => $id])
        );
        $form->bind($article);
        if ($this->getRequest()->isPost()) {
            $form->setData($this->getRequest()->getPost());
            if ($form->isValid()) {
                $this->getArticleService()->saveContent($form->getData());
            }
        }

        return new ViewModel([
            'content' => $article,
            'form' => $form,
        ]);
    }
68126
protected function getCodeUrl($redirect_uri) {
		$this->setState('redirect_uri', $redirect_uri);
		return $this->providerOptions['authorize'] . '?client_id=' . $this->client_id . '&redirect_uri=' . urlencode($redirect_uri) . '&scope=' . $this->scope . '&team=' . $this->team . '&state=' . md5(time());
	}
1021722
public function actionLogout($redirect = null)
	{
		\App::$domain->account->auth->logout();
		\App::$domain->navigation->alert->create(['account/auth', 'logout_success'], Alert::TYPE_SUCCESS);
		if($redirect) {
            return $this->redirect([SL . $redirect]);
        } else {
            return $this->goHome();
        }
	}
284628
private function buildRedirect( $redirectUrl, $redirectCode )
	{
		if ( is_null( $redirectCode ) )
		{
			return new Redirect( $redirectUrl );
		}
		else
		{
			return new Redirect( $redirectUrl, $redirectCode );
		}
	}
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;
    }