Not really sure where this posts bets fits, but here goes.
I just wondering if there is an "easy" to allow both upper and lower case letters, as well as spaces in URLs? By default umbraco creates a URL with lowercase letters and spaces has been replaced by a -
i.e.: /about/home/runway-page.aspx
what i'm looking to do is something like i.e.: /About/Home/Runway Page.aspx
Is this possible to do via urlrewrite.config (haven't been able to find anything in the documentation) or is my only option messing around with IIS?
I'm not sure how to achieve this, but seen from a user/SEO point of view, its better to have a hyphen (-) than a space in the url. Because some browsers stil can't understand a space in the URL, and makes %20 instead. This can easily give some very ugly URL's. And Google sees a hyphen as a space, so this would work just fine. Why do you want to change this? - just currious :)
This was just a small tip, and not the answer to your question at all.
No matter what, I'll follow this question, because it's already nice to know :)
I agree with Kim that you probably don't want to use spaces in urls. They'll work but when you paste one into and email, for instance, the auto-linking in most email systems (and forum packages) will stop at the first whitespace, which wouldn't be the full url.
But if you do want to do it, or simply to modify the rules that umbraco uses to create urls, look in the /config/umbracoSettings.config file. You'll see a section that has all the rules for the urls. You can add or remove any you like. They are applied top to bottom.
I agree with both of you, and I actually like the fact that Umbraco is setup by default to replace a space with a hyphen. So I gave you both the thumbs up. But the space replacement was actaully just a little extra thing I put in there because I was wondering if it was even possible. Which is was, simply editing the umbracoSettings.config was an easy task.
But the question about upper/lower case urls still hasn't been answered. No where in the umbraoSettings.config does it mention letter casing, and it seems that default is making everything lowercase. What I was hoping for was that I could tell Umbraco to leave casing of the letters to the end user, and still be able to use umbraco.library.NiceUrl to get the url with the right casing.
The reason why i'm asking about the upper/lowecase letters is that we had one customer wanting to be in control of upper/lowercase letters in the url because of product branding concerns - some products should always be written in uppercase letters, and at the moment I don't see that this is possible in Umbraco without some kind of hack? Maybe i'm wrong?
So I would guess that the best bet is do make some sort of module of your own that makes sure that visitors that arrive at example.com/home/this_should_be_capital/details.aspx are 301 redirected to example.com/home/THIS_SHOULD_BE_CAPITAL/details.aspx
I think you might be able to pull that off using urlrewriting.config but you need to make sure that you make it case sensitive somehow first.
Maintain letter casing/spacing in url
Hi All,
Not really sure where this posts bets fits, but here goes.
I just wondering if there is an "easy" to allow both upper and lower case letters, as well as spaces in URLs? By default umbraco creates a URL with lowercase letters and spaces has been replaced by a -
i.e.: /about/home/runway-page.aspx
what i'm looking to do is something like i.e.: /About/Home/Runway Page.aspx
Is this possible to do via urlrewrite.config (haven't been able to find anything in the documentation) or is my only option messing around with IIS?
- Morten
Hi Morten
I'm not sure how to achieve this, but seen from a user/SEO point of view, its better to have a hyphen (-) than a space in the url. Because some browsers stil can't understand a space in the URL, and makes %20 instead. This can easily give some very ugly URL's. And Google sees a hyphen as a space, so this would work just fine. Why do you want to change this? - just currious :)
This was just a small tip, and not the answer to your question at all.
No matter what, I'll follow this question, because it's already nice to know :)
/Kim A
I agree with Kim that you probably don't want to use spaces in urls. They'll work but when you paste one into and email, for instance, the auto-linking in most email systems (and forum packages) will stop at the first whitespace, which wouldn't be the full url.
But if you do want to do it, or simply to modify the rules that umbraco uses to create urls, look in the /config/umbracoSettings.config file. You'll see a section that has all the rules for the urls. You can add or remove any you like. They are applied top to bottom.
cheers,
doug.
I agree with both of you, and I actually like the fact that Umbraco is setup by default to replace a space with a hyphen. So I gave you both the thumbs up.
But the space replacement was actaully just a little extra thing I put in there because I was wondering if it was even possible. Which is was, simply editing the umbracoSettings.config was an easy task.
But the question about upper/lower case urls still hasn't been answered. No where in the umbraoSettings.config does it mention letter casing, and it seems that default is making everything lowercase.
What I was hoping for was that I could tell Umbraco to leave casing of the letters to the end user, and still be able to use umbraco.library.NiceUrl to get the url with the right casing.
The reason why i'm asking about the upper/lowecase letters is that we had one customer wanting to be in control of upper/lowercase letters in the url because of product branding concerns - some products should always be written in uppercase letters, and at the moment I don't see that this is possible in Umbraco without some kind of hack? Maybe i'm wrong?
Anyway thanks for answering
- Morten
Umbraco does an explicit ToLower when creating the xml for a document:
So I would guess that the best bet is do make some sort of module of your own that makes sure that visitors that arrive at example.com/home/this_should_be_capital/details.aspx are 301 redirected to example.com/home/THIS_SHOULD_BE_CAPITAL/details.aspx
I think you might be able to pull that off using urlrewriting.config but you need to make sure that you make it case sensitive somehow first.
This might be a starting point:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.