there was a wrong parenthesis. the last match needs to be ANDed with all the prior checks. also and inverted the first check, this effectively removes the need for the check for home_path. still allows redirects to different sub-uris.