You are here

function globalredirect_goto in Global Redirect 6

Same name and namespace in other branches
  1. 7 globalredirect.module \globalredirect_goto()

A wrapper for drupal_goto() that does not pass through if $path is an external URL.

1 call to globalredirect_goto()
globalredirect_init in ./globalredirect.module
Implements hook_init().

File

./globalredirect.module, line 236
The Global Redirect module redirects for all paths which have aliases but are not using the aliases which reduces the risk of duplicate content.

Code

function globalredirect_goto($path = '', $query = NULL, $fragment = NULL, $http_response_code = 301) {
  if (!globalredirect_url_is_external($path)) {
    return drupal_goto($path, $query, $fragment, $http_response_code);
  }
}