XF 2.2 Stuck in redirection loop from database

RBM

New member
I moved my forum from a subdirectory like https://domain.com/forums/ to a subdomain like https://forums.domain.com. I also added a redirect in my .htaccess file to point the old forum to the new forum for SEO. But the old database is redirecting my forum back to the subdirectory. I also can't access the Admin page using the old database on the subdomain (It says "A server error occurred. Please try again later.").

I pinpointed the issue of being connected to the old database because if I use a new database, everything works and there is no redirection back to the subdirectory (but obviously all my forum data is gone then). I could not find any URLs in the database itself. Does anyone know how I can stop the redirect back to the subdirectory I was previously using?
 

Brogan

XenForo moderator
Staff member
The Board URL needs to be updated in the Options.

You can do that by logging in to admin.php directly, but you will need to resolve the server error first if it is preventing you from logging in.

Try adding this to the src/config./php file:
PHP:
$config['enableListeners'] = false;
 

RBM

New member
Unfortunately, the config didn't change the server error when using the old database. Perhaps it might be better to import specific tables into the new database to get the data back. Are you aware of any documentation on which tables would need to be imported for the threads and posts?
 

Brogan

XenForo moderator
Staff member
You can't do a partial import like that - all of the tables are interconnected with many other tables.

Check the server error log.
 

RBM

New member
The Xenforo Admin server error log shows no errors (it did show errors when adding the config written above, warning about the listener for addons, after I went back to the fresh database). The only server error logs showing on the server itself were for when I added an /images/ directory to the /src/ directory. The server was blocking access to those with a 403 error. Since removing those images, there have been no other errors showing.

The server has no issues at all with a fresh database, so I'm not confident that the warning about a server issue is really a server issue. Since the only time there is a problem is if I use the old database. Any thoughts on a next step from here?
 

Brogan

XenForo moderator
Staff member
Not really.

I've never heard of a simple URL change manifesting in this way.

Presumably the database wasn't moved, just the server files were moved from the sub directory to the sub forum.

If a database dump and restore was involved then that would be a potential cause.
 
Top