Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 如何组合不同的AddHandler?_Apache_.htaccess_Url Rewriting_Universal Code - Fatal编程技术网

Apache 如何组合不同的AddHandler?

Apache 如何组合不同的AddHandler?,apache,.htaccess,url-rewriting,universal-code,Apache,.htaccess,Url Rewriting,Universal Code,昨天,我问了一个问题,以便我可以在不同的服务器上使用它。 今天,我发现问题只出现在1行, “AddHandler” 在1台服务器上,它通过在顶部添加 AddHandler x-httpd-php5-cgi .html 在另一台服务器上使用时 AddHandler x-httpd-php5 .php .html 但当我将这两条线路结合起来时,它只能在单个服务器上工作。难道不能将不同的“AddHandler”组合起来在所有服务器上工作吗?为什么要强制PHP引擎处理.html文件?我在html

昨天,我问了一个问题,以便我可以在不同的服务器上使用它。
今天,我发现问题只出现在1行,
“AddHandler”

在1台服务器上,它通过在顶部添加

AddHandler x-httpd-php5-cgi .html  
在另一台服务器上使用时

AddHandler x-httpd-php5 .php .html

但当我将这两条线路结合起来时,它只能在单个服务器上工作。难道不能将不同的“AddHandler”组合起来在所有服务器上工作吗?

为什么要强制PHP引擎处理.html文件?我在html文件中使用各种PHP代码。我希望html文件被视为php,所以我添加了这些行来将html文件解析为php