I experienced this problem and reported it on the mailing list.  To recover from this (albeit with some annoying reconfiguration chores afterward), perform the following steps:

  1  BACK UP YOUR CURRENT, BROKEN DATABASE!  (I lost my backup and Richard was
     thus not able to figure out what went wrong.)
  2  <code>fossil configuration reset all -R repository-file-name</code>
  3  <code>fossil ui</code>
  4  Go through your settings and re-establish your users, access, etc.

That should get you your code again at least.  It doesn't solve the problem of the actual redirect, of course.