URL Re-writing remove trailing slashes without breaking /umbraco/
Following an SEO review I have been asked to remove all trailing slashes from URLs on our site. I have tried the following rule but this breaks access to the backoffice:
which I presume you are already using if you don't have aspx extensions?
and in combination with a setting in config/umbracosettings.config
{!-- this will add a trailing slash (/) to urls when in directory url mode --}
{addTrailingSlash}false{/addTrailingSlash}
this should accomplish what you want?
forgot to mention updating the umbracosettings.config will require an apppool recycle to have that acted on, and you might have to republish the entire site to get url rebuilt for pages
Maybe a bit too much for your problem only but maybe SEO Checker can help http://soetemansoftware.nl/seo-checker This allows you to remove the / with a single mouse click and does all the other SEO rewrite rules for you and a lot more of course. Oh and it doesn't break the backoffice :).
Maybe nice to install it on your dev machine to check what it can do.
Thanks I have been planning to start using SEO Checker with new sites. Will try to have a play and see how easiy we can integrate into this existing site - we already have lots of re-writes and the 404 Checker / Redirect package.
URL Re-writing remove trailing slashes without breaking /umbraco/
Following an SEO review I have been asked to remove all trailing slashes from URLs on our site. I have tried the following rule but this breaks access to the backoffice:
<add name="noendslash"
virtualUrl="^(.*)/$"
rewriteUrlParameter="IncludeQueryStringForRewrite"
redirect="Application"
destinationUrl="~$1"
ignoreCase="true" />
Any regex experts who can help?
there;s a setting in the web.config
which I presume you are already using if you don't have aspx extensions?
and in combination with a setting in config/umbracosettings.config
this should accomplish what you want?
forgot to mention updating the umbracosettings.config will require an apppool recycle to have that acted on, and you might have to republish the entire site to get url rebuilt for pages
Thanks I have all those settings correctly set. I think the issue is someone can still use /mypage/ and the end slash is not removed?
http://moz.com/blog/duplicate-content-block-redirect-or-canonical perhaps the canonical setting can help?
Remembered this reference too
http://umbraco.miketaylor.eu/2010/11/03/url-rewriting-and-seo/
Hi,
Maybe a bit too much for your problem only but maybe SEO Checker can help http://soetemansoftware.nl/seo-checker This allows you to remove the / with a single mouse click and does all the other SEO rewrite rules for you and a lot more of course. Oh and it doesn't break the backoffice :).
Maybe nice to install it on your dev machine to check what it can do.
Best,
Richard
Thanks I have been planning to start using SEO Checker with new sites. Will try to have a play and see how easiy we can integrate into this existing site - we already have lots of re-writes and the 404 Checker / Redirect package.
Hi,
Great it was already on your radar. It should work fine all together with rewrite rules and url tracker.
Best,
Richard
The IIS rewrite rule works on top the exsiting Umbraco rewrites. Also going to try trialing the SEO checker to add to the site for the content team.
Huge thanks for your help :)
is working on a reply...