Score:0

Nginx - How to redirect /.html path

nl flag

i want to redirect route that looking for html file with empty name,

this request => /blablablabla/.html, i want to redirect it to /my-correct-page

using my rule, i was able to redirect all request to /blablablabla/ path, for example: /blablablabla/flower.html was successfully redirected and all other request was successfully redirected for that path, except for this one /blablablabla/.html

location ~* ^ /blablablabla/ {
   return 301 /blablablabla;
}

Thank you

Richard Smith avatar
jp flag
What other `location` blocks do you have in the `server` block? maybe you have another location that matches URIs containing `/.`
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.