Currently converting a site from Joomla to Drupal and I'm putting in redirects via the path redirect module. URL looks like example.com/index.php/component/content/article/.... This is redirecting to the front page; I would like to to redirect to example.com/component/content/article/...; from there path redirect can redirect.

function globalredirect_init() {
...
  // Do a check if this is a front page
  if (drupal_is_front_page()) {
    // Redirect if the current request does not refer to the front page in the
    // configured fashion (with or without a prefix)
    if (isset($_REQUEST['q']) && $_REQUEST['q'] != $prefix) {
      drupal_goto('', $query_string, NULL, 301);
    }
    elseif ($settings['nonclean_to_clean'] &&
            ((bool)variable_get('clean_url', 0)) &&
            (strpos(request_uri(), '?q=') || strpos(request_uri(), 'index.php'))) {
      drupal_goto('', $query_string, NULL, 301);
    }
    // If we've got to this point then we're on a front page with a VALID
    // request path (such as a language-prefix front page such as '/de')
    return;
  }
...
}
CommentFileSizeAuthor
#1 globalredirect-938640.patch1.1 KBmikeytown2

Comments

mikeytown2’s picture

Category: task » feature
Status: Active » Needs review
StatusFileSize
new1.1 KB