Files
kfitz.info/content/blog/2013-07-14-get-me-rewrite.md
Kathleen Fitzpatrick 655ad0ded8 upgrade to 3.0
2024-10-14 19:27:15 -04:00

23 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: 'Get Me Rewrite!'
date: '2013-07-14T04:55:20-04:00'
permalink: /get-me-rewrite/
tags:
- tinkering
---
Consider this a plea for help:
This site has been through some serious migrations over the years. Its had two different hosting providers and three different blog platforms, among other kinds of changes. As a result, its permalink structure has changed over time, and Ive had to use mod\_rewrite to grapple with redirecting old inbound links to where they need to go.
By and large, Ive been able to manage this. Ive got one big lingering problem, however, that results from neither a server nor a platform migration.
For several years, Planned Obsolescence ran on a single-site WordPress installation, with pretty `/%postname%/` permalinks. A little while back, I got the bright idea that I should consolidate it with a few other WP instances I was running, through one clean multi-site installation.
This is now the main site of that multi-site instance. But multi-site WP adds `/blog/` to the URLs of all posts in that main site. And so inbound links that are looking for `http://plannedobsolescence.net/post-title` get 404d.
I have searched around, both within wordpress.org and out in the larger internets, for a way to use htaccess to redirect such inbound links to `http://plannedobsolescence.net/blog/post-title`. But Ive run into several problems, most notably, infinite redirect loops: even when I include a `!blog` condition in the rewrite rule, the request still gets caught in some redirect vortex. I also need to make sure that a few pages and secondary blog directories dont wind up with `/blog/` added to their URLs.
Ive created a 404 page that attempts to explain the problem, and I should probably just let it go at that, but knowing all those errors are out there makes my OCD kick in. So if there were a mod\_rewrite guru out there willing to help me work through this problem, Id be enormously grateful.