I found a minor bug in StackOverflow. If you are not logged into Stack Overflow and are viewing tagged questions, the url is as follows: /questions/tagged/c%23

When you then login into StackOverflow, and are redirected to the url previously visited, the url now is: /questions/tagged/c#

The questions you now are looking at are ones tagged with and not .
I guess this is because when you are redirected it treats %23 as # instead of using the actual %23 characters.

  • This is the correct place for placing bugs. – George Duckett Feb 25 '13 at 8:45
  • @GeorgeDuckett Ok thanks (: – Rhexis Feb 25 '13 at 10:12

I've done a little bit of research on it:

When you click [login] you're redirected here:


That should actually be:


In other words, the %23 is not encoded again when used in the redirect location.


Yes, you are right: it is. The problem is that IIS and ASP.NET (in combination) make a bit of a mess of URLs if they are slightly non-trivial. There are even some pathological edge-cases where two very different urls inbound come back with the same .Url if you look at it inside ASP.NET; go figure. For example, /x%3Fa%3Db vs /x?a=b. Even though it gets routed correctly, both of these end up with the url saying /x?a=b.

It has annoyed me a few times, too, when browsing the tag only to end up back on .

The good news is: I've found some tricks that allow me to do this properly - will be deployed next build. It definitely needed fixing - it was bad enough for , but for anything international it was positively bejiggered. Thanks for giving me a nudge to fix it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .