do not show page redirect alert at debug mode
change if to which
fix #40 : thx @ nedrocks for the pull-request