diff --git a/src/template_utils.rs b/src/template_utils.rs index 6c034d15..db935ab6 100644 --- a/src/template_utils.rs +++ b/src/template_utils.rs @@ -389,7 +389,10 @@ macro_rules! url { $($common_args = $common_args,)* $($custom_args = $custom_args,)* ); - let path = origin.segments().skip(1).map(|seg| format!("/{}", seg)).collect::(); //first segment is domain, drop it + let path = origin + .segments() // first segment is /custom_domain, + .skip(2)// second is , drop both + .map(|seg| format!("/{}", seg)).collect::(); let query = origin.query().map(|q| format!("?{}", q)).unwrap_or_default(); format!("https://{}{}{}", &domain, path, query) } else {