additional case handling if base_url is defined, but empty.
solves problem with redirecting to anoer app described here
https://groups.google.com/forum/?fromgroups=#!topic/chicagoboss/LXR_TI6nZQk
Merge pull request #327 from danikp/fix_app_redirect

additional case handling if base_url is defined, but empty.