Simplify gateway's static/dynamic check

If there is a file in the doc root matching request, serve it.
If there is not, serve dynamically.