Score:0

NGINX Redirect with a query string refusing to work

in flag

I'm adding around 30 redirects, 90% of them are straight forward URLs, however there's a few that have query strings e.g.

.com/?page_id=2966
.com/?page_id=2965
.com/?page_id=2964

All the other redirects work fine, however none of these ones work using the following rewrite rule:

rewrite ^/?page_id=2966$ /sustainable-travel? permanent;
rewrite ^/?page_id=2965$ /car-sharing? permanent;
rewrite ^/?page_id=2964$ /eco-driving? permanent;

We've reloaded and restarted the server without any luck - Is there something special we should be doing in a config to capture these?

Thanks

Richard Smith avatar
jp flag
See [this answer](https://stackoverflow.com/a/49192527/4862445) over on SO.
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.