title: Current url multilanguage
body: <p>I have the following code:</p>
  
  <pre><code>public function UrlLang() {
  if ( (!isset($_REQUEST['lang'])) || (isset($_REQUEST['lang']) &amp;&amp; ($_REQUEST['lang'] == 'es' || $_REQUEST['lang'] == 'ES')) ) {
          $Url = SITE_URL .'en/' . array_pop(explode('/', $_SERVER['REQUEST_URI']));
      } else {
          $Url = SITE_URL .'' . array_pop(explode('/', $_SERVER['REQUEST_URI']));
      }
          return $Url;
      }
  </code></pre>
  
  <p>The code returns the current url me, the problem is that if my url is not in the root url not work for me.</p>
  
  <p>example:</p>
  
  <p>http: // localhost / My_Cms_Db /
  It works well.</p>
  
  <p>http: //localhost/My_Cms_Db/nosotros.php
  It works well.</p>
  
  <p>http: //localhost/My_Cms_Db/nosotros/index.php
  It does not work well.</p>
  
  <p>Thanks in advance for any help you can give me.</p>