How to change the file type using htaccess?


Use the following htaccess code to make any file be a certain kind of file type. The htaccess code below makes image.jpg, index.html, default.cgi all act as php. Put this code in your htaccess file.

ForceType application/x-httpd-php
SetHandler application/x-httpd-php


Article ID: 389
Created: Sun, Mar 14, 2010
Last Updated: Sun, Mar 14, 2010
Author: Administrator

Online URL: https://www.articlediary.com/article/how-to-change-the-file-type-using-htaccess-389.html