3

I've configured a redirect to point from anything in the root directory to /racktables/. When I actually go to http://host/, however, I am redirected to http://host/racktables, which, of course, redirects back to http://host/racktables ad infinitum.

Entry from web.config: <httpRedirect enabled="true" destination="/racktables/" exactDestination="true" childOnly="true" />

Is it possible to get IIS to honor this redirect exactly, or will I have to create a redirect in the default document at the root of the site? It seems like that would be a fairly significant oversight on Microsoft's part.

  • Are you using the URL Rewrite Module? – Brent Pabst Jul 3 '12 at 15:28
  • I'm using the HTTP Redirect module. – bshacklett Jul 3 '12 at 16:02
1

If you take a look at the URL Rewrite Module it has some default rules to enforce or change the URL. Two of them that I know about are converting the entire URL to lowercase and another appends a trailing slash to all non-file requests. They are there primarily for SEO purposes but combined with what you have might "replace" or compliment your current setup.

| improve this answer | |
1

I had this same problem and solved it by setting the redirect target to (e.g.) http://host/racktables/#. IIS didn't strip off my otherwise useless # and it kept the /.

As long as your web application doesn't choke on the empty hash, it should work for you, too.

| improve this answer | |

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.