We Recommend

Pro Apache Pro Apache
In addition to installation, maintenance, and deployment, the book demonstrates how to configure Apache to use Perl, PHP, and Python as server-side scripting languages. And unlike other books on Apache, Pro Apache provides comprehensive information on both major revisions - 1.3 and 2.0 - of the software.


Posted By

fris on 12/27/07


Tagged

php files rewrite


Versions (?)


Who likes this?

3 people have marked this snippet as a favorite

basicmagic
sammylau
vertoo


alias all .php files to .html


Published in: Apache 


  1. Options +FollowSymLinks
  2. RewriteEngine On
  3. RewriteCond %{SCRIPT_FILENAME} !-f
  4. RewriteCond %{REQUEST_URI} ^(/.+\.)html$ [NC]
  5. RewriteCond %{DOCUMENT_ROOT}%1php -f
  6. RewriteRule \.html$ %1php [NC,QSA,L]

Report this snippet 

You need to login to post a comment.