Hi Gliders, I’m trying to have nice and short URLs for customers which directly leads them to their individual profile screen in the app.
Through a rewrite rule in the .htaccess file on my subdomain go.mydomain.com I want to redirect to the deep link URL and hence to the correct screen.
If I’m using the deep link URL right in the browser it works and the correct screen is shown.
If I’m redirecting this same URL through the server redirect, the browser first loads the correct URL but then the app opens the default start screen.
Has anyone an idea why in the second case the deep link doesn’t link to the right screen?
By realising that some deep links have %3D ( encodes the = character) in the URL string, I found the following workaround.
Obviously, the server redirect strips %3 from the string → leading to a different URL sent to the client.
Hence, you need to manually backslash escape the % → % in the htaccess file.
Explanation: https://stackoverflow.com/questions/59892620/encoded-url-in-htaccess-301-redirect-mod-rewrite
With the following code in the htaccess file of my subdomain go.mydomain.com I’m able to give nice and short links to my customers
RewriteEngine on
RewriteRule ^customernameXY/?$ https://app.mydomain.com/dl/ewAiAHQAIgA6ADQALAAiAHMAIgA6ACIAYwBsAGEAcwBzAC0AUAByAG8AZAB1AGMAZQByAHMAIgAsACIAcgAiADoAIgBpAEkAcgBiAEoAbgBYAGsAUgBVAHkAagBMAGMALQByAEkAYQBFAEsAMwBnACIALAAiAG4AIgA6ACIAQQAuACAARAAuACIAfQA\%3D [NE,R=301,L]