title: Redirect all .php traffic to .php5 files
body: <p>I have a personal website with a MediaWiki installation on a shared host. The Apache configuration treats all .php request with PHP 4, and all .php5 requests with PHP5.</p>
  
  <p>For compatibility reasons I need to be able to use the .php extension, but MediaWiki is only available on PHP5. I tried to use the mod_rewrite engine, but I'm stuck with the rule.</p>
  
  <p>Here's the current file:</p>
  
  <pre><code>DirectoryIndex index.php5
  
  RewriteEngine on
  
  
  # This rewrites URIs in the form /pages/Article_Name to /index.php5?title=Article_Name.
  RewriteCond %{REQUEST_URI} !^/pages/index.php5.*$ [NC]
      RewriteRule ^pages/?(.*)$ /index.php5?title=$1 [L]
  
  # This is the broken rule
  RewriteCond %{REQUEST_URI} ^index\.php(([^5])(.*))?$ [NC]   
      RewriteRule ^index\.php(([^5])(.*))?$ /index.php5?$1 [L]
  </code></pre>
  
  <p>The idea of the rule was "Redirect all content from index.php (not followed by '5') to index.php5".</p>
  
  <p>Any idea?</p>
  
  <hr>
  
  <p>Edit: </p>
  
  <pre><code>SetEnv PHP_VER 5
  </code></pre>
  
  <p>works, but I'm still interested on why the rule was not taken into account.</p>