Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Process specific .htm page as .php on Apache server [duplicate]

I'm programming for an Apache server and I need for just one specific html page (say, first.htm) to be processed as PHP script. Is it possible to set up?

like image 919
ahmd0 Avatar asked Dec 11 '25 13:12

ahmd0


1 Answers

SetHandler directive can be used, too:

Forces all matching files to be processed by a handler

When placed into an .htaccess file or a or section, this directive forces all matching files to be parsed through the handler given by handler-name.

<Files first.htm>
    SetHandler application/x-httpd-php
</Files>
like image 138
Salman A Avatar answered Dec 13 '25 02:12

Salman A