Score:0

How to redirect any requests for guacamole home page using nginx?

lu flag

I want to redirect only https://guacamole.example.com/#/ (aka guacamole homepage) to https://denied.example.com. But, I don't want https://guacamole.example.com/#/sessiondetails/logindetails to be redirected.

But when i use in nginx this:

location = / {
    return 302 http://denied.example.com/;
}

it redirects all url requests no matter if it's the root or any url on guacamole.example.com. This nginx block works on another html server, but just doesn't work on guacamole.

I have also tried

location = /#/ {
    return 302 http://denied.example.com/;
}

but still the same problem.

I came across this website: https://www.apponfly.com/ Where they achieved exactly the same thing that doesn't work for me. They have blocked the access to the guacamole homepage by redirecting to a different domain. But i have noticed they have a "/rdp/" directory in url, as a root for the /#/ which i don't have. What do they use the "/rdp/" for, and how can i do that?

Sorry if i said something wrong, i'm absolutely new to nginx and guacamole

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.