additional case handling if base_url is defined, but empty.

solves problem with redirecting to another app described here
https://groups.google.com/forum/?fromgroups=#!topic/chicagoboss/LXR_TI6nZQk

also related to issue #280