0

i have a small .htaccess file which allow me to run 1 html file as php

<Files yourpage.html>
AddType application/x-httpd-php .html
</Files>

i need to edit this script so it run all .html and .htm files as .php and i need this to apply for the files not only yourpage.html i tried to do it like that

AddType application/x-httpd-php5 .php .html

but it doesn't make any sense i though to remove yourpage.html and put *.html but i don't if its the right way or not

Marco
  • 842
  • 6
  • 18
  • 42
  • This seems to be already answered here: http://stackoverflow.com/questions/4687208/using-htaccess-to-make-all-html-pages-to-run-as-php-files – Chris Aug 19 '11 at 15:13
  • Possible duplicate of [problem with htaccess file and handlers?](https://stackoverflow.com/questions/7127156/problem-with-htaccess-file-and-handlers) – kenorb Nov 06 '17 at 14:14

1 Answers1

1

Use:

AddType application/x-httpd-php .html
Victor
  • 5,493
  • 1
  • 27
  • 28