# Deep link and domain server redirect

**URL:** <https://community.glideapps.com/t/deep-link-and-domain-server-redirect/34243>\
**Category:** Ask for Help\
**Created:** [November 9, 2021, 8:55am UTC](https://community.glideapps.com/t/deep-link-and-domain-server-redirect/34243 "2021-11-09T08:55:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![christoph](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/christoph/32/22794_2.png) [@christoph](https://community.glideapps.com/u/christoph)\
**Post date:** [November 9, 2021, 8:55am UTC](https://community.glideapps.com/t/deep-link-and-domain-server-redirect/34243/1 "2021-11-09T08:55:58Z")

</div>

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](http://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?

---

<div class="post-metadata">

**Author:** ![christoph](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/christoph/32/22794_2.png) [@christoph](https://community.glideapps.com/u/christoph)\
**Post date:** [November 9, 2021, 10:38am UTC](https://community.glideapps.com/t/deep-link-and-domain-server-redirect/34243/2 "2021-11-09T10:38:03Z")

</div>

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](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](http://go.mydomain.com) I’m able to give nice and short links to my customers 🙂

```auto
RewriteEngine on
RewriteRule ^customernameXY/?$ https://app.mydomain.com/dl/ewAiAHQAIgA6ADQALAAiAHMAIgA6ACIAYwBsAGEAcwBzAC0AUAByAG8AZAB1AGMAZQByAHMAIgAsACIAcgAiADoAIgBpAEkAcgBiAEoAbgBYAGsAUgBVAHkAagBMAGMALQByAEkAYQBFAEsAMwBnACIALAAiAG4AIgA6ACIAQQAuACAARAAuACIAfQA\%3D [NE,R=301,L]

```

Example:  
[go.mydomain.com/customernameXY](http://go.mydomain.com/customernameXY) → translates via the deep link to the correct screen in the app

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [November 10, 2021, 10:38am UTC](https://community.glideapps.com/t/deep-link-and-domain-server-redirect/34243/3 "2021-11-10T10:38:48Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
