Is it best (or even possible) to replace spaces using URL Rewrite or using ASP/ASP.net before the URL is sent? If it's the former, can it be done with a wizard within IIS? Also, I will need to replace capital letters and accented characters with an equivalent e.g. é with e, is this best done with URL Rewrite?

I've tried some of the tutorials on the official IIS website and have got through a simple rewrite wizard, but replacing characters seems more complicated, and I'm sure some of the tutorials have errors in them...

Thanks for any help. :)

Recommended Answers

All 5 Replies

I can't remember the specific namespace, but .NET has a built in URLEncode, and URLDecode functions that take a string and make it compliant with standard URLs

Thanks, though I don't think that's what I need as it changes spaces to pluses and non-standard characters to a % and hexadecimal value.

Alright, I'm guessing you aren't going to be using the string in an URL then.

The URL I want will be something like this: www.webaddress.com/150211/title-of-news-article instead of www.webaddress.com/article.asp?date=150211&title=title-of-news-article

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.