How to write a '?' in the path of a universal link?

2.6k views Asked by At

How can a question mark ? be specified as part of the paths pattern in the apple-app-site-association file?

The path should match the URLs:

domain.com/?a
domain.com/?ab
domain.com/?abc
...

The following does not work:

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "<myAppId>",
                "paths": ["/\?*"]
            }
        ]
    }
}
1

There are 1 answers

3
Palpatim On BEST ANSWER

That's not supported. From Apple:

Note that only the path component of the URL is used for comparison. Other components, such as the query string or fragment identifier, are ignored.

If you have access to the configuration of the server, you might want to try rewriting these as path-addressable, rather than query addressable resources, either by an alias, rewrite rule, or similar mechanism.