自PHP扩展不被解析 [英] Custom php extension not being parsed
本文介绍了自PHP扩展不被解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想改变的.php
扩展包含.foo,将其隐藏的场所。
我的web服务器已经安装的cPanel,所以我登录并点击MIME类型,并输入以下内容:
I wanted to change the .php
extension to .foo, to hide it for visitors.
My webserver has cPanel installed, so I logged in and clicked on "MIME Types", and entered the following:
MIME Type: application/x-httpd-php
Extension: foo
问题是,它没有被解析为PHP,而是下载(当你点击链接,包含所有该文件的code文件正在下载)
The problem is that it's not being parsed as PHP, but instead is downloaded (when you click the link, a file containing all the code of that file is being downloaded)
我将如何解决这个问题?
How would I solve this?
推荐答案
添加在的httpd.conf
或 vhost.conf
<IfModule mime_module>
AddType application/x-httpd-php .foo
</IfModule>
但要解决问题,你最好的办法是使用的mod_rewrite
这篇关于自PHP扩展不被解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文