Ignore:
Timestamp:
09/06/11 11:02:50 (13 years ago)
Author:
alexandrecorreia
Message:

Ticket #2261 - Corrigido os varios redirecionamentos no modulo mobile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/mobile/index.php

    r4126 r5053  
    88        //$fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; 
    99        $fwConstruct = isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $proxies[0] : $_SERVER['HTTP_HOST'];   
    10         $REQUEST_URI = substr( $_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], "/mobile/" ) + 8 ); 
     10        $REQUEST_URI = substr( $_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], "/mobile/"+1)); 
     11        if( strpos( $_SERVER['REQUEST_URI'], "/mobile/" ) !== false ) 
     12        { 
     13                $REQUEST_URI = substr($_SERVER['REQUEST_URI'], 0, strpos( $_SERVER['REQUEST_URI'], "/mobile/")); 
     14        } 
     15         
    1116        $fwConstruct .= $REQUEST_URI; 
    1217         
     
    2126                $aux = 'https://'; 
    2227            } 
    23                  
    24             Header('Location: ' . $aux . $fwConstruct . "login.php"); 
    25                 exit; 
     28           
     29            Header('Location: ' . $aux . $fwConstruct . "/login.php"); 
     30                exit; 
    2631        } 
    2732 
     
    2934        { 
    3035                if ($_SERVER['HTTPS'] != 'on') { 
    31                         Header('Location: https://' . $fwConstruct . '/' . $_SERVER['REQUEST_URI']); 
     36                        Header('Location: https://' . $fwConstruct . $_SERVER['REQUEST_URI']); 
    3237                        exit; 
    3338                } 
Note: See TracChangeset for help on using the changeset viewer.