https://xenforo.com/community/resources/categories/redirection-scripts-2-x.52/
If you are already using these files (you'll be able to see a file named 301config.php and showthread.php amongst others in your XF root directory) then it's likely these files that are triggering this behaviour as they will be attempting to load the XF1 framework (it seems like the XF1 files are still on the server). If those old redirection scripts are on the server, you can download the new ones from the link above. You'll just need to upload all files from the ZIP
except 301config.php to the root of your XF installation replacing the existing files and that should sort the issue.