63

My old blog is no more. Existing links will (slowly) give a 404. I'm working on getting a new domain structure which I control, so that in the future I can put my own redirects in place etc, but I can't do that retroactively with the old posts.

When my new blog is up and running and I'm confident in the new structure, it would be really helpful if I could provide Stack Exchange with a map of old URL to new URL, and the fix-up be done automatically for all posts and comments, regardless of who made them. I could write a tool using the Stack Exchange API to do this for posts, but it feels like the kind of thing that would be best done by the Stack Exchange team, potentially without changing the last-modified date and edit record (as it's not a useful semantic edit, just a change of navigation). Additionally, that would allow for changes in comments and deleted posts which I couldn't otherwise edit.

Is there any facility for this already?

14
  • 3
    After the MSO/MSE split and the link edits attributed to Community going wrong first, then having to be reapplied, all the while adding new revisions, its clear the answer is No, there is no such tool. Commented Jul 25, 2014 at 10:27
  • 9
    This is why it's recommended that answers be self-sufficient. Did you read the FAQ yet?
    – devnull
    Commented Jul 25, 2014 at 10:30
  • 27
    @devnull: The answers will still be useful, but not as useful as they'd be if the links were fixed. "Self-sufficient" != "contains every scrap of relevant information".
    – Jon Skeet
    Commented Jul 25, 2014 at 10:33
  • @MartijnPieters: Does that event suggest that such a tool would be useful? (I suspect so - as does rene's link two comments down.)
    – Jon Skeet
    Commented Jul 25, 2014 at 10:33
  • @VotetoClose: I suspect it would be more efficient to write the API tool, to be honest - I can find the posts easily enough, and my edits wouldn't need to be approved by others. (Most of the posts will be mine, of course.)
    – Jon Skeet
    Commented Jul 25, 2014 at 10:34
  • 5
    Also relevant the blogs.sun.com is dead
    – rene Mod
    Commented Jul 25, 2014 at 10:34
  • 2
    @JonSkeet: It'd absolutely be useful. I dread the possibility legacy.python.org is switched of without a redirect back and would love to see such a tool. Commented Jul 25, 2014 at 10:40
  • 1
    @MartijnPieters: I guess if I write such a tool with the API and make it public later, then that would be a start. I suspect that doing this within Stack Exchange itself would be more efficient and robust, but that's a different matter...
    – Jon Skeet
    Commented Jul 25, 2014 at 10:41
  • I doubt the team would like to spend time on this. Writing the tool using the API sounds/feels as the best idea. Alternatively for this case the Broken Link Review queue could be enabled only letting your posts in.
    – rene Mod
    Commented Jul 25, 2014 at 11:07
  • 1
    A hybrid approach would be to first take care of the heavy lifting by identifying all the relevant posts and writing the tool via the API. Then hand the list + tool over to SE so they can tweak as necessary and then run it. Props for considering the ripple effect on SE from changing your blog, although I'm sure you're the only one who would ever link to your blog. ;-)
    – user194162
    Commented Jul 25, 2014 at 12:49
  • @MartijnPieters "...would love to see such a tool"... you weren't talking about me, I hope. Commented Jul 25, 2014 at 14:59
  • @Andrew'saUnitato: well, if you are prepared to go through all those links by hand and fix them for us, then you can be that tool. Commented Jul 25, 2014 at 15:00
  • You may want to update the blog link in your "about me" here on MSE too...
    – Oded StaffMod
    Commented Jul 29, 2014 at 14:07
  • FYI there's a party on your behalf. :) Commented Feb 25, 2016 at 9:38

1 Answer 1

78

We don't have a way to do this, but as luck happens we're software developers.

Jon, you've given a metric crap ton of knowledge here and it's supplemented by blog links all over the place. We don't want that to be harmed, so on something of this scale we'll just make it happen.

Send me a URL mapping to craver at stackoverflow; I'll make it happen.

12
  • Any chance that will be open-source like the DataExplorer?
    – rene Mod
    Commented Jul 25, 2014 at 20:05
  • 6
    @rene this would be a developer route I deploy, run, and nuke one time in our code base...so nope. It'd also be specific to our schema and methods, so it wouldn't even make much sense. That being the said, sure - I can still post the code here.
    – Nick Craver Mod
    Commented Jul 25, 2014 at 20:07
  • 1
    You complete star :) I'm just getting the new blog up and running at the new address over the weekend - which in itself will need mappings for internal references. When I'm sure it's all correct, I'll ping you a file. Any particular preference? (XML is probably simplest for me, but...)
    – Jon Skeet
    Commented Jul 25, 2014 at 20:51
  • @JonSkeet whatever you're making anyway I can use - it'll just get tossed in LinqPad here and converted anyway.
    – Nick Craver Mod
    Commented Jul 25, 2014 at 20:54
  • There are some old low-level dev routes for pattern replace, but I can't say that we've tested them in the last 4 years... Commented Jul 25, 2014 at 21:57
  • 5
    Don't forget the related sidebar on stackoverflow.com/questions/ask/advice! The Writing the perfect question link to Jon's article is b0rken now. Commented Aug 6, 2014 at 10:55
  • @JonSkeet I finally have some time today to get this remap in - just checking before I run it though: any plans to move the yoda.arachsys.com stuff as well?
    – Nick Craver Mod
    Commented Aug 11, 2014 at 10:37
  • @NickCraver: Not imminently, but possibly at some point. I can put some more thought into that sooner, if it would be useful. In particular, I suspect there are about 4 or 5 really important URLs, which I could move earlier than the others, if that would be useful.
    – Jon Skeet
    Commented Aug 11, 2014 at 10:44
  • @JonSkeet if you want to move them, it'll be easier to batch them into this for sure - want to move what you want then send me a list of just those? I have at least 58 things to do, I promise I won't be idle waiting for a few more to make this more efficient overall :)
    – Nick Craver Mod
    Commented Aug 11, 2014 at 11:16
  • @NickCraver: Righto. Do you already have a histogram of some sort for which ones are the most used, and therefore the most useful ones to move earlier? If not, I'll guess - which shouldn't be too hard.
    – Jon Skeet
    Commented Aug 11, 2014 at 11:43
  • 1
    @JonSkeet nope, but you can check pretty easily via elastic here: stackoverflow.com/search?q=url%3A%22*yoda.arachsys.com*%22 just plug in some to get result counts. I may put together a dev tool on our side to exploit our indexing to run checks like this, give it a wildcard and it gives matches by count desc....hmmm that sounds very useful, will implement that after this big elasticsearch client/async change going out today.
    – Nick Craver Mod
    Commented Aug 11, 2014 at 11:47
  • @NickCraver: Thanks. Immediate result is that almost everything there is to do with C#, which makes it easier - I can migrate articles over to csharpindepth.com, which I'd already started to do.
    – Jon Skeet
    Commented Aug 11, 2014 at 11:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .