XF 2.2 Moved from subdomain to root now links in posts are wrong.

gavpeds

Active member
Ok so how do I fix this? Moved from IPS to xenforo.

IPS was in root I then installed xenforo in subdomain and imported our IPS forum. Did some testing etc then deleted our IPS install and moved our xenforo install from subdomain to root (from beta.mydomain.com to mydomain.com). All seemed ok until I started clicking links within posts to other posts. They are all beta.mydomain.com

Any ideas on how I can fix this, please?
 

Brogan

XenForo moderator
Staff member
URLs in posts do not update when changing domains - the content is static, not dynamic.

You will need to implement redirection, or update the posts.

The only dynamic URLs generated are those which use the Board URL.
Presumably you updated that when you moved XF?
 

gavpeds

Active member
Ok, thanks any clue on how to redirect any beta.windowcleaningforums.co.uk/* domain to windowcleaningforums.co.uk/* star being anything after the main domain?

I found and tried this but doesn't seem to work.

Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^beta\.windowcleaningforums\.co.uk  [NC]
RewriteRule ^(.*) https://windowcleaningforums.co.uk/$1 [L,R=301]
 
Last edited:

Muddy Boots

Active member
Yes, do a db query to change them, you can do this in phpmyadmin with search and replace if you dont know how to do it in mysql in ssh

Be sure to backup your DB first in case of issues
 
Top