I'm on Umbraco 7.7.2 with Models Builder, and working on ways to reduce duplicate content. I would prefer the route of using canonical links to remedy this. I put together a little razor logic to produce the link...
@{
var node = Umbraco.TypedContent(@Model.Id);
if (node != null)
{
string path = node.UrlAbsolute();
<link rel="canonical" href="@path" />
}
}
...but would like to remove the trailing slash at the end of the URL value.
Ability to remove last trailing slash from URL
I'm on Umbraco 7.7.2 with Models Builder, and working on ways to reduce duplicate content. I would prefer the route of using canonical links to remedy this. I put together a little razor logic to produce the link...
...but would like to remove the trailing slash at the end of the URL value.
Is this possible with this code?
Would this not suffice? umbracoSettings.config
That worked. My apologies for overlooking the setting for that!
is working on a reply...