robustness: only try to redirect if there's a primary domain, ensure slash between domain and path