which should add a slash at the end of the the URL but it doesn't? I have refreshed the app-pool, stopped and restarted the site but if i type in the url as
says:
addTrailingSlash As mentioned in the comment above, this will add a trailing slash to the url when umbracoUseDirectoryUrls in the web.config file is set to "true". If you don't want to have a trailing slash when directory urls are in use simply just set the value to false.
so try to set this setting as well if not already?
@David Challener - Yes that is the documentation i referred to and i have umbracoUseDirectoryUrls and addTrailingSlash both set to true.
@Alex Skrypnyk - I ran a report and it states the pages created are being looked as duplicate (with and without a slash), so i thought to have slashes at the end of the URLs.
Is there a rule/addon i could use as only some pages are being highlighted but i cant see a reason why. I just dont want any of the existing pages to become 404's.
Thanks Alex, how could i do that? Is there a plugin i could use? I tried doing it via Web.config but had looping errors, so i didnt want to make the issue any worse.
Yes, this is the rule from v8 and you can see that when using negate="true" you're saying you don't want to include it in the match. So this is saying ignore the umbraco folder and install folder etc.
addTrailingSlash not working?
I have seen the setting
which should add a slash at the end of the the URL but it doesn't? I have refreshed the app-pool, stopped and restarted the site but if i type in the url as
mysite.com/aboutus
then it doesnt add a slash at the end.
Any ideas?
Hi,
I normally use a rewrite rule myself but the documentation https://our.umbraco.com/documentation/reference/config/umbracoSettings/
says: addTrailingSlash As mentioned in the comment above, this will add a trailing slash to the url when umbracoUseDirectoryUrls in the web.config file is set to "true". If you don't want to have a trailing slash when directory urls are in use simply just set the value to false.
so try to set this setting as well if not already?
HTH, David
hi J
"addTrailingSlash" adds trailing slash to the end of URLs rendering by IPublishedContent.Url - method.
If you just type in browser and you want to be redirected to the URL with a slash - you need to use a redirect or rewrite rule.
Why do you want to add trailing slash?
Thanks,
Alex
@David Challener - Yes that is the documentation i referred to and i have umbracoUseDirectoryUrls and addTrailingSlash both set to true.
@Alex Skrypnyk - I ran a report and it states the pages created are being looked as duplicate (with and without a slash), so i thought to have slashes at the end of the URLs.
Is there a rule/addon i could use as only some pages are being highlighted but i cant see a reason why. I just dont want any of the existing pages to become 404's.
Thanks
Hi J
You are right, the page with "/" and without - 2 different pages for google crawlers, so it's better to do the redirect for all sites.
Thanks Alex
Thanks Alex, how could i do that? Is there a plugin i could use? I tried doing it via Web.config but had looping errors, so i didnt want to make the issue any worse.
Hi J
Use this rewrite rule:
Thanks, Alex
This thread should be able to give a couple of ways of achieving this
https://our.umbraco.com/forum/developers/extending-umbraco/22807-Add-Trailing-Slash-Url-Rewrite
Thanks, David
Thanks guys, the code i'm currently using is (i think i need the slash as theres less issues overall for the site)
however some pages that i dont want the / to append to, does. Is there a way to exclude some directories from adding a slash to or file extensions?
Yes, this is the rule from v8 and you can see that when using negate="true" you're saying you don't want to include it in the match. So this is saying ignore the umbraco folder and install folder etc.
HTH, David
Thank you so much David Challener. You saved my time!
is working on a reply...