Fixed rewrite of permalinks in nginx