That url is not fully qualified, so you will be redirected to path inside your current site.
for instance if you placed this widget on telligent.com and added:
$core_v2_page.Redirect('telligent.com')
you would be redirected to telligent.com/telligent.com
This would be the correct redirect:
$core_v2_page.Redirect('http://telligent.com')
--------------------------------------------------------------------------------
The intent of #if (!$core_v2_widget.IsInWidgetPreviewMode) is to provide the ability for a widget to behave differently when you are in edit mode (when you are placing the widget). For example, if the logout widget did not check for preview mode, when you tried to edit the logout page you would be logged out of the site. That is why I suggested it in this instance. When you are editing the page you place this widget on, you would never want the redirect to execute. Using the IsInWidgetPreviewMode call you could provide an alternate functionality, maybe outputting the url that would have redirected too as text.