Supporting Urls With ~/ while redirecting.
Fix for Issue#304