title: .htaccess mod_rewrite "Request exceeded the limit of 10 internal redirects due to probable configuration error. "
body: <p>This is my .htaccess:</p>
  
  <pre><code>RewriteEngine ON
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*) index.php
  
  Options -Indexes
  </code></pre>
  
  <p>It is used in a simple framework and the idea is to redirect request like: www.domain.com/subpage  to index.php, which will call the subpage.</p>
  
  <p>And my index.php is:</p>
  
  <pre>
      function __autoload( $className ) {
      $className = strtolower( $className );
      // Trying to find proper directory. For pages - all the predefined languages' directories must be present and checked!
      $file =  'pages_pl/' . $className . '.php';
      if( file_exists( $file ) ) { require( $file ); }
      else {
          $file =  'pages_en/' . $className . '.php';
          if( file_exists( $file ) ) { require( $file ); }
          else {
              $file = 'lib/' . $className . '.php';
              if( file_exists( $file ) ) { require( $file ); }
              else {
                  $file = 'admin/' . $className . '.php';
                  if( file_exists( $file ) ) { require( $file ); }
              }
          }
      }
  }
  
  
  // Get page class
  $pageClass = Parameters::page();
  
  $language = null;
  
  if( $pageClass == '' )   //if the class was not given, one depending on language will be called
  {
  //take language from the cookie, if present and valid
      if(isset($_COOKIE['lang']) && Language::exists($_COOKIE['lang'])) {
          $page = new Language::$MAINPAGE[$_COOKIE['lang']];
      }
      else {
          $defaultMainPage = Language::getDefaultMainPage();
          $page = new $defaultMainPage();  //default main page
      }
  }     //if the specific class exists, it will be loaded
  else if( class_exists( $pageClass ) ) //this makes __autoload() run
  {
      $class = new ReflectionClass( $pageClass );
      if( $class->isInstantiable() )
          $page = new $pageClass();  //instantiate proper page here
      else
          $page = new Error404();
  }
  else
      $page = new Error404();
  
  $language = $page->getLanguage(); //get the page's language     
  
  ?>
       //replaced triangle parentheses with round ones
      (head)
     ....
      (/head)
      (body)
          displayPart( 'top' );
          //print_r( $_SESSION );
              $page->displayContent();
              $page->displayPart( 'footer' );
          ?>
      (/body)
  (/html)
  </pre>
  
  <p>And the Parameters class:
  <code></p>
  
  <pre><code>// This class decomposes URL address and returns: page, parameter1, parameter2 ...
  
  class Parameters
  {
      static private $isInitialized = false;
      static private $values;
  
      private function __construct() { 
      }
  
      static private function init()
      {
          if( self::$isInitialized == true ) return;
  
          $url = substr( $_SERVER['REQUEST_URI'], strrpos( $_SERVER['REQUEST_URI'], '/' ) + 1 );
  
  
        if( strpos( $url, '?' ) )
        {
            $url = substr($url, 0, strrpos($url, '?'));
        }
  
          self::$values = explode( ',', $url );
  
          self::$isInitialized = true;
      }
  
      static public function page()
      {
          self::init();
          return self::$values[0];
      }
  
      static public function get( $index )
      {
          self::init();
          if( $index &lt; count( self::$values ) ) return self::$values[$index];
              else return null;       
      }
  }
  </code></pre>
  
  <p></code></p>
  
  <p>Can anyone help please?</p>