[英]How to set content / mime type of apple-app-site-association as application/json
I am trying to setup universal app links for my app and am trying to upload the apple-app-site-association to the server at "/" and "/.well-known " locations but when I navigate to it I get a 404 error. 我正在尝试为我的应用设置通用应用程序链接,并尝试将apple-app-site-association上传到服务器“/”和“/.well-known”位置但是当我导航到它时,我得到了404错误。
The mime type is not application/json when I try to create one it always reverts back to type text and not application/json. 当我尝试创建一个mime类型时,它不是application / json,它总是恢复为键入文本而不是application / json。
I do not have access to Virtual Hosts/Apache Settings on Plesk for the server nor do I have access to the etc/sites-available to set content-type of the file.This is my reference https://gist.github.com/anhar/6d50c023f442fb2437e1#modifying-the-content-type . 我没有访问Plesk上的虚拟主机/ Apache设置服务器,也没有访问etc / sites-可用于设置文件的内容类型。这是我的参考https://gist.github.com / anhar / 6d50c023f442fb2437e1#modification-the-content-type 。
The contents of my file are 我的文件的内容是
{
"applinks": {
"apps": [],
"details": [
{
"appID": "XXXXX.com.domain.appname",
"paths": [
"*"
]
}
]
}
}
Please help. 请帮忙。
The server provided by the client is IIS so I had to upload a json file apple-app-site-association.json, and put in a rewrite rule in web.config file ,found at root, 客户端提供的服务器是IIS,因此我必须上传一个json文件apple-app-site-association.json,并在web.config文件中输入重写规则,在root中找到,
<rewrite>
<rules>
<rule name="apple_json_file">
<match url="^apple-app-site-association" />
<action type="Rewrite" url="apple-app-site-association.json" />
</rule>
</rules>
</rewrite>
Did the trick for me. 对我有把戏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.