开发者

HTML file to behave like PHP (how to rewrite file extension)

How can I rewrite file extension, so when file have extension html, Apache thinks that is php extension?

I need it because I have to install some PHP application, which contains HTML files with PHP code in it...

Tryed with .htaccess:

RewriteEngine On
RewriteBase /
RewriteRule  ^(.开发者_开发问答*).html$ $1.php [R=301]

... but no luck.

Thank you in advance!


Try this:

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

in your .htaccess

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜