Used when you need to redirect to another view, and you only
        have the final plugin:// url.
344841
def redirect(self, url):
        ''''''
        # TODO: Should we be overriding self.request with the new request?
        new_request = self._parse_request(url=url, handle=self.request.handle)
        log.debug('Redirecting %s to %s', self.request.path, new_request.path)
        return self._dispatch(new_request.path)
667021
@SneakyThrows
    protected ModelAndView redirectToApproveView(final J2EContext ctx, final OAuthRegisteredService svc) {
        val callbackUrl = ctx.getFullRequestURL();
        LOGGER.trace("callbackUrl: [{}]", callbackUrl);

        val url = new URIBuilder(callbackUrl);
        url.addParameter(OAuth20Constants.BYPASS_APPROVAL_PROMPT, Boolean.TRUE.toString());
        val model = new HashMap<String, Object>();
        model.put("service", svc);
        model.put("callbackUrl", url.toString());
        model.put("serviceName", svc.getName());
        model.put("deniedApprovalUrl", svc.getAccessStrategy().getUnauthorizedRedirectUrl());

        prepareApprovalViewModel(model, ctx, svc);
        return getApprovalModelAndView(model);
    }
284272
function redirect(ctx, url, status) {
  if (ctx.accepts('html', 'json') === 'json') {
    ctx.set('Location', url);
    ctx.status = 401;
    ctx.body = {
      error: '401 Unauthorized'
    };
    return;
  }
  return ctx.redirect(url, status);
}
481820
def get_redirect_url(self, request, **kwargs):
        
        if self.url:
            url = self.url % kwargs
            args = request.META.get('QUERY_STRING', '')
            if args and self.query_string:
                url = "%s?%s" % (url, args)
            return url
        else:
            return None
1016114
String lastLink() {
    if (totalResults == null || currentLimit == 0L) {
      return null;
    }

    Long lastOffset;
    if (totalResults % currentLimit == 0L) {
      lastOffset = totalResults - currentLimit;
    } else {
      // Truncation due to integral division gives floor-like behavior for free.
      lastOffset = totalResults / currentLimit * currentLimit;
    }

    return urlWithUpdatedPagination(lastOffset, currentLimit);
  }
1068548
def get_post_authorization_redirect_url(request, canvas=True):
    

    path = request.get_full_path()

    if canvas:

        if FACEBOOK_APPLICATION_CANVAS_URL:
            path = path.replace(urlparse(FACEBOOK_APPLICATION_CANVAS_URL).path, '')

        redirect_uri = 'https://%(domain)s/%(namespace)s%(path)s' % {
            'domain': FACEBOOK_APPLICATION_DOMAIN,
            'namespace': FACEBOOK_APPLICATION_NAMESPACE,
            'path': path
        }
    else:
        if FANDJANGO_SITE_URL:
            site_url = FANDJANGO_SITE_URL
            path = path.replace(urlparse(site_url).path, '')
        else:
            protocol = "https" if request.is_secure() else "http"
            site_url = "%s://%s" % (protocol, request.get_host())
        redirect_uri = site_url + path

    return redirect_uri
667932
public Result redirect(String url) {
        status(Status.SEE_OTHER);
        with(HeaderNames.LOCATION, url);
        return this;
    }
178072
function redirect(url, response) {
    const header  = {
        'Location': url
    };
    
    assert(url, 'url could not be empty!');
    assert(response, 'response could not be empty!');
    
    fillHeader(header, response);
    response.statusCode = MOVED_PERMANENTLY;
    response.end();
}
453699
def get_view_url(self):
        
        request = self.request
        url = request.getURL()
        qs = request.getHeader("query_string")
        if not qs:
            return url
        return "{}?{}".format(url, qs)
30197
public function redirectionLink()
    {
        // Check external redirect
        if ($this->RedirectionType == 'External') {
            return $this->ExternalURL ?: null;
        }

        // Check internal redirect
        /** @var SiteTree $linkTo */
        $linkTo = $this->LinkToID ? SiteTree::get()->byID($this->LinkToID) : null;
        if (empty($linkTo)) {
            return null;
        }

        // We shouldn't point to ourselves - that would create an infinite loop!  Return null since we have a
        // bad configuration
        if ($this->ID == $linkTo->ID) {
            return null;
        }

        // If we're linking to another redirectorpage then just return the URLSegment, to prevent a cycle of redirector
        // pages from causing an infinite loop.  Instead, they will cause a 30x redirection loop in the browser, but
        // this can be handled sufficiently gracefully by the browser.
        if ($linkTo instanceof RedirectorPage) {
            return $linkTo->regularLink();
        }

        // For all other pages, just return the link of the page.
        return $linkTo->Link();
    }
1026492
def redirect(self, url, method=None, **kwargs):
        
        return self.nest(Redirect(url, method=method, **kwargs))
704397
def get_redirect_url(self, *args, **kwargs):
        
        if self.url:
            url = self.url % kwargs
        elif self.pattern_name:
            try:
                url = reverse(self.pattern_name, args=args, kwargs=kwargs)
            except NoReverseMatch:
                return None
        else:
            return None
        return url
637414
function getVisUrl(url) {
    var match = /https?:\/\/(\S+)\.cartodb\.com\/viz\/(\S+)\/(?:public_)?map/.exec(url);
    if (match) {
        var user = match[1],
            mapId = match[2];
        return 'https://' + user + '.cartodb.com/api/v2/viz/' + mapId + '/viz.json';
    }
}
413803
function topLevelRedirect (url) {
  if (window === top) location.href = url
  else parent.postMessage('slackin-redirect:' + id + ':' + url, '*')
  // Q: Why can't we just `top.location.href = url;`?
  // A:
  // [sandboxing]: http://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/
  // [CSP]: http://www.html5rocks.com/en/tutorials/security/content-security-policy/
  // [nope]: http://output.jsbin.com/popawuk/16
}
253915
function get_after_plugin_activation_redirect_url() {
            $url = false;

            if ( ! $this->is_addon() || ! $this->has_free_plan() ) {
                $first_time_path = $this->_menu->get_first_time_path();

                if ( $this->is_activation_mode() ) {
                    $url = $this->get_activation_url();
                } else if ( ! empty( $first_time_path ) ) {
                    $url = $first_time_path;
                } else {
                    $page = '';
                    if ( ! empty( $this->_dynamically_added_top_level_page_hook_name ) ) {
                        if ( $this->is_network_registered() ) {
                            $page = 'account';
                        } else if ( $this->is_network_anonymous() ) {
                            $this->maybe_set_slug_and_network_menu_exists_flag();
                        }
                    }

                    $url = $this->_get_admin_page_url( $page );
                }
            } else {
                $plugin_fs = false;

                if ( $this->is_parent_plugin_installed() ) {
                    $plugin_fs = self::get_parent_instance();
                }

                if ( is_object( $plugin_fs ) ) {
                    if ( ! $plugin_fs->is_registered() ) {
                        // Forward to parent plugin connect when parent not registered.
                        $url = $plugin_fs->get_activation_url();
                    } else {
                        // Forward to account page.
                        $url = $plugin_fs->_get_admin_page_url( 'account' );
                    }
                }
            }

            return $url;
        }
330520
def get_redirect_url(self, **kwargs):
        """"""
        provider_id = kwargs.get('provider', '')
        provider = self.get_provider(provider_id)
        if not provider:
            raise Http404('Unknown OAuth provider.')
        callback = self.get_callback_url(provider)
        params = self.get_additional_parameters(provider)
        return provider.get_redirect_url(self.request, callback=callback, parameters=params)
1058384
function chooseViewForRoute() {
            var allParams = addExtraParamsTo(params,
                layoutDelegate,
                serverRequest,
                serverResponse
            );

            return promisify(originalHandler).apply(router, allParams)
                .then(function(view) {
                    validateView(view);

                    return {
                        view: view,
                        reason: null,
                    };
                })
                .catch(function(reason) {
                    return {
                        view: null,
                        reason: reason
                    };
                });
        }