开发者

Use htaccess to change file type, works on some servers, others it prompts download of file

开发者 https://www.devze.com 2023-02-03 16:47 出处:网络
I\'m using htaccess to change a file extension from gif to php but it does not change on a particular test server, instead it prompts a download for the gif file which reveals the php.

I'm using htaccess to change a file extension from gif to php but it does not change on a particular test server, instead it prompts a download for the gif file which reveals the php.

The .htaccess file is in the same directory as the gif. The code looks like this, any ideas?

开发者_如何学JAVA<Files trackme.gif>

ForceType application/x-httpd-php

</Files>


Try SetHandler instead of ForceType:

SetHandler application/x-httpd-php
# or
SetHandler application/x-httpd-php5
0

精彩评论

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

关注公众号