Using .htaccess to make all .html pages to run as .php files?

前端 未结 16 1492
忘了有多久
忘了有多久 2020-11-22 00:41

I need to run all of my .html files as .php files and I don\'t have time to change all of the links before our presentation tomorrow. Is there any way to \"hack\" this with

16条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 01:42

    I'm using PHP7.1 running in my Raspberry Pi 3.

    In the file /etc/apache2/mods-enabled/php7.1.conf I added at the end:

    AddType application/x-httpd-php .html .htm .png .jpg .gif
    

提交回复
热议问题