Fixed dynamic sites middleware