Redirect back to this form with an added #anchor link

@return HTTPResponse
481930
public function redirectBackToForm()
    {
        $pageURL = $this->getReturnReferer();
        if (!$pageURL) {
            return $this->redirectBack();
        }

        // Add backURL and anchor
        $pageURL = Controller::join_links(
            $this->addBackURLParam($pageURL),
            '#' . $this->form->FormName()
        );

        // Redirect
        return $this->redirect($pageURL);
    }
793541
public function redirect()
    {
        $previous = Url::previous(Widget::RETURN_URL_PARAM);

        return !empty($this->redirectUrl) ? $this->controller->redirect($this->redirectUrl)
            : $this->controller->redirect($previous);
    }
213569
public function Link()
    {
        $form = $this->form;

        return Controller::join_links(
            $form->getDisplayLink(),
            sprintf("?%s=%s&StepID=%s", $form->getGetVar(), $this->getSession()->Hash, $this->ID)
        );
    }
276636
public function redirect()
    {
        $state = null;

        if ($this->usesState()) {
            $this->request->getSession()->set('state', $state = Str::random(40));
        }

        return new RedirectResponse($this->getAuthUrl($state));
    }
354751
public function loginUrl()
    {
        $query = 'client_id=' . $this->app->getId() . '&redirect_uri=' . urlencode($this->callback) . '&response_type=code&state=' . $this->state;
        $query .= isset($this->scopes) ? '&scope=' . urlencode(str_replace(',', ' ', implode(',', $this->scopes))) : '';

        return sprintf('%s%s?%s', Constants::API_HOST, Constants::API_AUTH, $query);
    }
1179325
public function redirect()
    {
        if (!$this->isStateless()) {
            $this->request->getSession()->put(
                'oauth.temp', $temp = $this->server->getTemporaryCredentials()
            );
        } else {
            $temp = $this->server->getTemporaryCredentials();
            $this->request->session()->put('oauth_temp', serialize($temp));
        }

        return new RedirectResponse($this->server->getAuthorizationUrl($temp));
    }
1339955
protected function redirectAfterUpdate()
    {
        merchant_toastr(trans('merchant.update_succeeded'));

        $url = Input::get(Builder::PREVIOUS_URL_KEY) ?: $this->resource(-1);

        return redirect($url);
    }
446082
protected function BackLink()
    {
        $params = array('site'=>$this->page->GetSite()->GetID());
        $params['selected'] = $this->page->GetID();
        return BackendRouter::ModuleUrl(new PageTree(), $params);
    }
265013
public function withoutRedirecting(): self
    {
        return tap($this, function ($request) {
            return $this->options = array_merge_recursive($this->options, [
                'allow_redirects' => false,
            ]);
        });
    }
525109
public function getResponse()
    {
        $response = redirect()->to($this->getRedirectUrl());
        $response->withInput($this->request->input());
        $response->withErrors($this->getErrors(), 'default');
        $response->setCharset(config('app.charset', 'UTF-8'));

        return $response;
    }
1080654
public function onSuccess()
    {
        $alert = $this->alertManager->create();

        $alert->addSuccess($this->translator->trans('success.save_banner_zone', array(), 'SilvestraBanner'));
        $this->alertManager->setFlashAlert($alert);

        return new RedirectResponse($this->router->generate('silvestra_banner.banner_zone_list'));
    }
293264
public function reset()
    {
        session()->forget($this->getSearchableKey());

        if (request()->redirectUri) {
            return redirect()->to(request()->redirectUri);
        }

        return redirect()->to($this->previousUrl());
    }
952972
protected function redirectForceSecure()
    {
        if (
            Request::secure() ||
            Request::ajax() ||
            !$this->property('forceSecure')
        ) {
            return;
        }

        return Redirect::secure(Request::path());
    }
117054
protected function htmlRedirect()
    {
        $headersSent = headers_sent($file, $line);
        $location = $this->getHeader('location');
        $url = Director::absoluteURL($location);
        $urlATT = Convert::raw2htmlatt($url);
        $urlJS = Convert::raw2js($url);
        $title = (Director::isDev() && $headersSent)
            ? "{$urlATT}... (output started on {$file}, line {$line})"
            : "{$urlATT}...";
        echo <<<EOT
<p>Redirecting to <a href="{$urlATT}" title="Click this link if your browser does not redirect you">{$title}</a></p>
<meta http-equiv="refresh" content="1; url={$urlATT}" />
<script type="application/javascript">setTimeout(function(){
	window.location.href = "{$urlJS}";
}, 50);</script>
EOT
        ;
    }
1265992
protected function BackLink()
    {
        $params = array('site'=>$this->site->GetID());
        if ($this->page->Exists())
        {
            $params['selected'] = $this->page->GetID();
        }
        else if ($this->previous)
        {
            $params['selected'] = $this->previous->GetID();
        }
        else if ($this->parent)
        {
            $params['selected'] = $this->parent->GetID();
        }
        return BackendRouter::ModuleUrl(new PageTree(), $params);
    }
847162
public function redirect()
    {
        $url = Common::getRequestVar('url', '', 'string', $_GET);
        if (!UrlHelper::isLookLikeUrl($url)) {
            die('Please check the &url= parameter: it should to be a valid URL');
        }
        // validate referrer
        $referrer = Url::getReferrer();
        if (empty($referrer) || !Url::isLocalUrl($referrer)) {
            die('Invalid Referrer detected - This means that your web browser is not sending the "Referrer URL" which is
				required to proceed with the redirect. Verify your browser settings and add-ons, to check why your browser
				 is not sending this referrer.

				<br/><br/>You can access the page at: ' . $url);
        }

        // mask visits to *.piwik.org
        if (!self::isPiwikUrl($url)) {
            Piwik::checkUserHasSomeViewAccess();
        }
        Common::sendHeader('Content-Type: text/html; charset=utf-8');
        echo '<html><head><meta http-equiv="refresh" content="0;url=' . $url . '" /></head></html>';

        exit;
    }
485238
protected function redirectToReferer(): RedirectResponse
    {
        $url = $this->requestService->fetchRefererUrl();

        // Oops, url of referer is unknown
        if ('' === $url) {
            throw CannotRedirectToEmptyRefererUrlException::create();
        }

        return $this->redirect($url);
    }