I am trying to force Nginx to redirect/rewrite one URL that uses a query string /?cat=20 to /category/lighttpd/. Here is what I tried, which is not working:
location ~ /\?cat=20 {
rewrite ^ http://kevinworthington.com/category/lighttpd/? permanent;
}
I first tried the first line as:
location ~ /?cat=20 {
but that didn't work for me either.
This is using WordPress as the CMS, if that makes any difference.
Your help or tips are appreciated. Thanks.
Just an example ...