can't download .apk file from server

↘锁芯ラ 提交于 2020-01-03 16:52:12

问题


I have an apk file on my server (which is hosted on Hostinger) CentOS OS

now I want users to download that file from my server.

but when I point the url to the apk location it says 404 page not found while I know there are entire web sites dedicated to doing it.

I tried modifying htaccess file

AddType application/octet-stream .apk

then

AddType application/vnd.android.package-archive .apk

then

<Files *.*>
ForceType application/octet-stream
</Files>

but that doesn't seem to work.

even tried doing this https://stackoverflow.com/a/28784154/4481968

PS. all other file formats get downloaded, even .APK file gets downloaded but not .apk (why is that?)


回答1:


I just had the same problem with Hostinger and wrote to the support.

They said, .apk files are blocked for security reasons.

However, rename the file to .APK, that is working as well and you can reach it on your server.




回答2:


Create file with name .htaccess and just paste the below code in it and move this file on your server where your apk file is placed

AddType application/octet-stream .apk

AddType application/vnd.android.package-archive .apk

ForceType application/octet-stream



来源:https://stackoverflow.com/questions/31760145/cant-download-apk-file-from-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!