简体   繁体   English

带有.html扩展名的OpenShift PHP

[英]OpenShift PHP with .html Extension

As we know, it is easy to get Apache to handle .html pages as PHP pages by adding the following line to http.conf: AddHandler application/x-httpd-php .php .html 众所周知,通过将以下行添加到http.conf中,很容易使Apache将.html页作为PHP页进行处理: AddHandler application / x-httpd-php .php .html

How can this be done in OpenShift? 如何在OpenShift中完成?

How can I edit http.conf in OpenShift? 如何在OpenShift中编辑http.conf?

Or is there another way? 或者还有另一种方式吗?

Have you tried using a .htaccess file? 您是否尝试过使用.htaccess文件? Try the answer from this stackoverflow question, but use php instead of perl/python: perl on php application on openshift 尝试从这个stackoverflow问题的答案,但在openshift上的php应用程序上使用php而不是perl / python: perl

这很容易,只需在所需的任何文件夹中的.htaccess中添加以下行:AddHandler application / x-httpd-php .php .html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM