mercredi 25 mars 2015

Nginx rewrite rule conflict with WordPress permalinks rule


Facing issue with nginx url rewrite rules. What I want is to serve http://ift.tt/1OvGQLM page when someone tries to access http://ift.tt/1Bg6URT url. And it should return 200 status. I tried below rewrite rule which works fine when wordpress permalink is set to default but as soon as I set permalink to custom below rules does not works.



location ~ ^(.*)/myfeed(.*) {
rewrite ^(.*)/myfeed(.*)$ $1$2 last;
}


Other rule in my nginx conf file is,



location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}


I guess my rule is conflicting with the WordPress custom permalink rule. Can anyone please help with this?





Aucun commentaire:

Enregistrer un commentaire