Score:0

nginx 301 redirect only regex matched url

cn flag

I need to permanent redirect only urls where the first 3 chars are NOT numbers

example url to redirect

/category/televisione/

/chi-e-alvin-eta-vita-privata-moglie-e-carriera-in-tv/

example url don't redirect

/25169zair43f0aka32c3d

/354zergve4sezsry34a32c3d

i tried this but not working

        location ~ "^/[a-zA-Z]{3}" {
                rewrite ^ https://www.antoherdomain.com$request_uri? permanent;
        }
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.