ws flag
This looks an awful lot like the XY problem. Even with simple URLs, rewriting or redirecting the URL in a webserver shouldbe your VERY LAST resort after after changing the places where the wrong URL has been published.
ws flag
BTW the "wrong" and "correct" URLs you've published here are the same.
Augusto Tantalean avatar
md flag
They are not the same, you can see the error here. check_in=2022%2F12%2F14 check_in=2022-12-14
ws flag
true but what about the %2F before `&submit=Search`?
Augusto Tantalean avatar
md flag
When I run the search, it breaks because the format is not correct.
Augusto Tantalean avatar
md flag
Check my site https://casadeaustin.pe. Try to do a search and look at the dates, you will see that at the beginning it shows a format and when you finish placing the dates the format changes. The problem is that on some mobile devices it does not change the format at the end and the search breaks.
us flag
You would need some `map` magic to rewrite the query arguments. However, you should fix the root cause, the application that is creating these invalid URLs in the first place.
Richard Smith avatar
jp flag
Possible solution: `if ($args ~ (.*)%2F(\d+)%2F(.*)) { return 301 $uri?$1-$2-$3; }`
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.