Score:0

How to remove part of an URL in Nginx?

us flag

I want to automatically remove /feed from the URL

For Example:

example.com/blog/something/feed/

to

example.com/blog/something/

Could someone tell me how to do this in Nginx?

Zareh Kasparian avatar
us flag
The answer to your question is : https://superuser.com/questions/435916/nginx-rewrite-rule-to-remove-path-node
Subhash avatar
us flag
@ZarehKasparian it is working only if the path is after the domain. but my question is to remove the last path from the URL not the first.
Zareh Kasparian avatar
us flag
its a regex, it looks the entire URL, and removes the mentioned part.
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.