There's an IIS 7.5 + ASP.NET 4.5 application named /AppName/ in a website.

When visiting http://example.com/appname/url?query=string, the browser is redirected to http://example.com/AppName/url to match the case of AppName (i.e. uppercase "A" and "N") which is fine, but in doing so the redirect drops the ?query=string part of the URL which is not fine.

How can it be configured to preserve that when it redirects? We didn't configure the redirect to happen so it must be default behavior to IIS or ASP.NET or to the CMS (Sitefinity in this case).

EDIT Jan 26, 2016:

I created a new application and just put a simple .aspx file in there and it didn't redirect, so I'm guessing this is something to do with the CMS and like @dancriel suggested may lie in the web.config (there are a bunch of handlers in there).

  • Just a quick suggestion - have you checked out this question? – MrMajestyk Jan 26 '16 at 14:51
  • @MrMajestyk Thanks but it looks like something different – sa289 Jan 26 '16 at 23:47

Have you checked your web.config file at the application root for redirect rules that might be affecting this?

| improve this answer | |
  • I think you're on the right track - I edited my answer. I'll leave the question open for now, but I'm thinking you'll probably end up being correct and now it's just a matter of figuring out what is doing it specifically. – sa289 Jan 27 '16 at 0:16
  • If you post your web.config perhaps the community can spot your problem. – dancriel Jan 27 '16 at 15:11
  • I suspect it's CMS-specific - we reached out to them directly, but thanks for the offer. I plan to come back here if I get more info from them. – sa289 Jan 27 '16 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.