Score:0

htaccess rewrite rule not applied when in A2HS/PWA mode?

th flag

My symfony5 application serves up a microsoft azure SSO link up front, and it works great through the browser. When a user opts to add my app to their iOS homescareen however, there is a problem.

Here is my htaccess config

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ public/$1

This makes the public/ level of my folder structure invisible, so that URIs from symfony look like this

https://www.myapp.com/node

rather than this

https://www.myapp.com/public/node

When ths microsoft SSO is used through a browser, a successful login attempt comes back to the route

https://www.myapp.com/login_microsoft_check

BUT, if I add my app to homescreen on an iOS device, for some reason my app tells the microsoft SSO interface to return a successful sign-in to this URI instead:

https://www.myapp.com/public/login_microsoft_check

What is going on here? Why is my htaccess rewrite rule not applied when in A2HS/PWA mode? My code is not aware of client A2HS or not, this is likely an htaccess configuration issue. On my end the same code is run regardless of request coming from an A2HS client or normal web browser client.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.