XF 2.3 Moving a WP site to Resources; redirect and import questions

Wildcat Media

Well-known member
Licensed customer
I'm in the process of testing to see whether or not we can move a WordPress site over to XF. These are custom taxonomies, and rather than mess with an importer, I will probably be copy/pasting these into Resources.

This is essentially a music database, and we have taxonomies set up for Albums and Songs.

For albums, each song title is a link to an individual page for a song. Likewise, each song links to the albums it is included on.

We would eventually convert all of these over to links directly in Resources, but until then, we might paste in all the content, and I could use a means to redirect these WP links to Resource links. There are over 80 album pages, and over 200 song pages. (Optionally, I'm looking at writing a script that would use the WP and XF APIs to import these as either threads to convert to resources using an add-on, or directly importing to resources. But I don't know if Resources is exposed as an API.)

I can rewrite the links using redirects in Apache, but is there another, better way to do this? (I don't have htaccess files, as I add directives to the vhosts files for efficiency.) I'm mainly hoping to avoid a large, messy configuration file, although I can include config files within vhosts so I don't clutter up a single file. That way, we can move everything off of Wordpress sooner, but can take our time updating the links as time allows.
 
htaccess (or whichever redirector you use) can redirect all the relevant WP links to a single PHP file. That file parses the WP link it receives, understands which song/album it refers to, and outputs the corresponding XF link. So one htaccess redirect to the PHP code, which then redirects again smartly.

Optionally the PHP script can also export the WP content to XF on the fly if the XF entry doesn't already exist, although ideally you would take care of the export in advance so as not to keep the user waiting while exporting takes place.
 
Back
Top Bottom