воскресенье, 30 декабря 2007 г.

Mask php mime type with htaccess

I decided to use .htm extension for the files and then process them using php:

Action application/
AddType application/

But problem is that php modifies normal filetype adding dynamic tags. Now I figured that it was better to have .php files and use mod_rewrite:

RewriteEngine on
RewriteBase /
RewriteRule ^index\.htm$ index.php [T=text/html]

Simple and it works! :)

Комментариев нет: