title: RealURL extension not working for typo3 v6.2.x when domain given as IP Address
body: <p>I have a webpage tree structure given below</p>
  
  <p><img src="https://i.stack.imgur.com/H105k.png" alt="Web Tree Structure"></p>
  
  <p>In this tree when I access like <code>http://localhost/mysite</code> its redirect to "Root Local" and accessed like <code>http://192.168.1.20/mysite/</code>  its redirect to "Root IP" by setting it in domain.</p>
  
  <p>I implemented <code>realURL</code> extension. and it working fine for <code>localhost</code> and URL become  <code>http://localhost/mysite/en/home/</code> .</p>
  
  <p>But when I tried to access it by <code>192.168.1.20</code> as domain, the URL shows like <code>http://192.168.1.20/mysite/en/home/</code>.
   Bur it shows the blank web page with <strong><em>error</em></strong> "<strong><em>This webpage has a redirect loop</em></strong>" .</p>
  
  <p>My <code>realurl_conf.php</code>   looks like</p>
  
  <pre><code>&lt;?php
  
    $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
      // sitename
      '_DEFAULT' =&gt; array(
        // initialization
        'init' =&gt; array(
          'useCHashCache' =&gt; '0', // für tt_news
          'enableCHashCache' =&gt; true,
          'appendMissingSlash' =&gt; 'ifNotFile',
          'enableUrlDecodeCache' =&gt; true,
          'enableUrlEncodeCache' =&gt; true,
          'emptyUrlReturnValue' =&gt; '/'
        ),
        // first url rewriting segment
        'preVars' =&gt; array(
          array(
            'GETvar' =&gt; 'L',
            'valueMap' =&gt; array(
              'de' =&gt; 3,
              'en' =&gt; 1,
  
            ),
            'valueDefault' =&gt; 1,
          ),
        ),
        // second url rewriting segment
        'pagePath' =&gt; array(
          'type' =&gt; 'user',
          'userFunc' =&gt; 'EXT:realurl/class.tx_realurl_advanced.php:&amp;tx_realurl_advanced-&gt;main',
          'spaceCharacter' =&gt; '-',
          'languageGetVar' =&gt; 'L',
          'expireDays' =&gt; 30,
          'rootpage_id' =&gt; 1
        ),
        // third url rewriting segment
        'fixedPostVars' =&gt; array(
        ),
        // forth url rewriting segment
        'postVarSets' =&gt; array(
          '_DEFAULT' =&gt; array(
            /*
                no_cache setting should not be used in preVars
                @see http://dmitry-dulepov.com/article/do-not-use-no-cache-as-prevar.html
            */
            'nc' =&gt; array(
              'type' =&gt; 'single',
              'GETvar' =&gt; 'no_cache',
            ),
  
          )
        ),
  
      )
    );
  
    $byPassLVar = array(
      array(
        'GETvar' =&gt; 'L',
        'valueMap' =&gt; array(),
        'noMatch' =&gt; 'bypass'
      )
    );
  
  
    $TYPO3_CONF_VARS['EXTCONF']['realurl']['Root_Local'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'];
    $TYPO3_CONF_VARS['EXTCONF']['realurl']['Root_Local']['pagePath']['rootpage_id'] = 1;
    $TYPO3_CONF_VARS['EXTCONF']['realurl']['Root_Local']['preVars'] = $byPassLVar;
    $TYPO3_CONF_VARS['EXTCONF']['realurl']['Root_IP'] = $TYPO3_CONF_VARS['EXTCONF']['realurl']['192.168.1.20'];
    $TYPO3_CONF_VARS['EXTCONF']['realurl']['Root_IP']['pagePath']['rootpage_id'] = 3;
    $TYPO3_CONF_VARS['EXTCONF']['realurl']['Root_IP']['preVars'] = $byPassLVar;
  
  
  
    switch (t3lib_div::getIndpEnv('HTTP_HOST')) {
      case 'Root_Local':
      $_GET['L'] = 1;
      break;
      case 'Root_IP':
      $_GET['L'] = 1;
      break;
      default:
      $_GET['L'] = 1;
      break;
    }
  
  ?&gt;
  </code></pre>
  
  <p>And I added  in the main Template </p>
  
  <pre><code>   config.simulateStaticDocuments = 0
     config.baseURL = http://192.168.1.20/mysite/
     config.tx_realurl_enable = 1
  </code></pre>
  
  <p>for the IP Address and</p>
  
  <pre><code>   config.simulateStaticDocuments = 0
     config.baseURL = http://localhost/mysite/
     config.tx_realurl_enable = 1
  </code></pre>
  
  <p>for local host</p>
  
  <p>Why it not working for the IP address as domain.??
  How can I make it work ?
  Thanks in advance</p>