Revert "reduce conditionals in url_for"

This reverts commit 9df60693d77813b362fb528fc62381ac8f1eec12.