Files
kfitz-site/content/blog/2011-09-18-rebuild-rewrite-redirect.md
Kathleen Fitzpatrick 655ad0ded8 upgrade to 3.0
2024-10-14 19:27:15 -04:00

2.1 KiB
Raw Blame History

title, date, permalink, tags
title date permalink tags
Rebuild, Rewrite, Redirect 2011-09-18T13:37:20-04:00 /rebuild-rewrite-redirect/
grousing
tinkering

If you follow me on Twitter, you may have heard me growling a bit over the last week or so about @#$%! SEO blackhats and their @#$%! pharmahack.

Suffice it to say, Id been gotten, and gotten so well that while I could find evidence theyd been there, I couldnt find the script that was actually doing the damage.

Happily I had a solid backup that predated the hack, and happily, I guess, I hadnt exactly been active around here since. So how did I handle the problem?

1. Wipe everything. Files, databases, everything.
2. Begin with a fresh installation of WordPress, a brand new database, and a new MySQL user.
3. Gradually rebuild the site.
4. Import tables one by one into the new database.
5. Tinker.

Unfortunately, Im stuck in that last step. Heres the problem: Ive been running multiple sites via multiple WP installs, and a weakness in any of them threatens the others. (Not to mention the work of keeping all those installations up to date.) So Ive decided to merge as much as I can into a single multi-site instance. And I figured Id go ahead and use a subdirectory setup, rather than treating each site as a subdomain, as everything ultimately belongs under the umbrella of plannedobsolescence.net.

But! Because it cant be that easy! WordPress 3.x, when set up as a subdirectory-based multisite installation, adds the slug “/blog/” to all of the permalinks of the main site. Which would of course be this site. Which means that all of my internal links are now broken, and any inbound links are broken as well.

Im fighting with mod_rewrite right now, and while Im hoping to find a better long-term solution than this, for the moment, if youre looking for something in particular, you may want to scroll to the bottom of the page and search for it.

And if youre smarter about mod_rewrite than I am (which really, really wouldnt take much), let me know.