Commit 5ad54a66 authored by myha's avatar myha Committed by Diana Wynn
Browse files

check for subdomain prefix to prevent a double redirect

parent a603f372
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ function mobile_subdomain_init() {
    $base_path    = base_path();
    $current_url  = $scheme . '://' . parse_url($base_url, PHP_URL_HOST) . $base_path . $path;
    $redirect_url = $scheme . '://' . variable_get('mobile_subdomain', 'm') . '.'  . $host . $base_path . $path;
    if ($current_url == $redirect_url) {
    if ($current_url == $redirect_url || strpos($host, variable_get('mobile_subdomain', 'm').'.') === 0) {
      $redirect_url = FALSE;
    }
  }