vendredi 21 août 2020

>= 400 error code with apple-app-site-association json file

As many others I am trying to implement universal links into my app.

I am using one.com as my webhotel provider, and have configured an apple-app-site-association json file without the json file ending.

Initially, I had troubles with strange characters appearing and the infamous content/type fault. I added this snippet to my .htaccess file as follows that solved that issue:

<Files "apple-app-site-association">
ForceType 'application/json'
</Files>

Below is the entire .htaccess code:

# Generated by One.com Website Builder
# Begin

<Files "apple-app-site-association">
ForceType 'application/json'
</Files>

RewriteEngine on

# Enforce SSL
# Handle non-www URLs
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^studievenn\.no [NC]
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Handle www URLs
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.studievenn\.no [NC]
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# Handle URLs without .html extension
RewriteCond %{REQUEST_METHOD} ^(GET) [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.html -f
RewriteRule ^(.*) $1.html [L]

# End
# Generated by One.com Website Builder

Here is the aasa validator response

enter image description here

I am primarily struggling with the

Your server returned an error status code (>= 400)

Fault, but also the two latters errors.

What could be the issue here?




Aucun commentaire:

Enregistrer un commentaire