Redirects after site reorganization

Index » Feedback

  • 1
 
epsilondelta Member
Registered: 2009-08-19 Posts: 55

Hey Fabrice,

How about configuring the server so as to redirect the old study page URLs properly? Like:

http://kanji.koohii.com/study/(index.php)?\?search=
http://kanji.koohii.com/study/(index.php)?\?framenum=

I'd provide Apache configuration snippets, but I'm a bit rusty on the syntax...

The URLs are used in quite a few Anki decks, I believe, so it'd be nice if they didn't break.

-- epsilondelta

fergal Member
From: Ireland Registered: 2008-12-13 Posts: 15 Website

And forum links please.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

I freakin' hate mod_rewrite, the patterns never seem to match anything or correspond to any regexp I know in Javascript or php. I hate this bloody thing sad   Just typing in the dark until something works..

@fergal : what do you mean by forum links?

Advertising (register and sign in to hide this)
JapanesePod101 Sponsor
 
ninetimes Member
Registered: 2008-10-08 Posts: 114

While it doesn't solve all of the problems, you can change your question display in your deck properties to look something like...

Code:

<a href="http://kanji.koohii.com/study/kanji/%(text:Keyword)s">%(Keyword)s</a>

Which should work fairly well presuming you've left your keywords mostly untouched.  What that doesn't solve is if you've customized your keywords any (I have... but only on a handful of cards so far), as that'll obviously send you to a non-existent destination.

Haven't looked at the ones with multiple keywords from edition changes yet, so I'm not sure how it'll work with that either.

A framenumber reference like before would be the most 'future-proof' solution, but in the meantime this is a decent bandaid.  Especially if you're working through a huge backlog at this moment, like me.  hmm

Last edited by ninetimes (2009 November 01, 5:36 pm)

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

@epsilondelta  Thanks for posting thr urls anyway.. I didn't use the old style urls for so long (local dev) I had forgotten them, and the old code was already replaced. That helped.

Those URL redirects should work now.

If you find anything please let me know.

It's getting late now so I'll look at fixing other URLs tomorrow evening it needed.

Amset Member
Registered: 2008-09-07 Posts: 94

ninetimes wrote:

While it doesn't solve all of the problems, you can change your question display in your deck properties to look something like...

Code:

<a href="http://kanji.koohii.com/study/kanji/%(text:Keyword)s">%(Keyword)s</a>

Which should work fairly well presuming you've left your keywords mostly untouched.  What that doesn't solve is if you've customized your keywords any (I have... but only on a handful of cards so far), as that'll obviously send you to a non-existent destination.

Haven't looked at the ones with multiple keywords from edition changes yet, so I'm not sure how it'll work with that either.

A framenumber reference like before would be the most 'future-proof' solution, but in the meantime this is a decent bandaid.  Especially if you're working through a huge backlog at this moment, like me.  hmm

You can do

Code:

<a href="http://kanji.koohii.com/study/kanji/%(text:Heisig number)s">%(Keyword)s</a>

or whatever you call the frame number. It works for me, and it is better if, as you say, people have changed keywords.

ninetimes Member
Registered: 2008-10-08 Posts: 114

Yeah I just realized that earlier -- after he implemented the redirects I noticed you could also reference it via the ../study/kanji/(framenum) format.

In fact I swapped to that exact same link format.

epsilondelta Member
Registered: 2009-08-19 Posts: 55

Thanks a lot, Fabrice!  You are awesome!

Last edited by epsilondelta (2009 November 01, 9:40 pm)

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

In a sense the urls for internal pages (ie. non-search engine-reachable) do not have ot use "pretty urls", but those are easier to type.

The new url format is:

/study/kanji/<your search term>

You should use an exact keyword or framenumber or a kanji character.

You can use an incomplete keyword in the search part of the url but you will only get what you expect if it is long enough to match the unique keyword. Eg. "/study/kanji/per" will match prosperous, but if you use "perf" then you will match "perfect".

aphasiac Member
From: 台湾 Registered: 2009-03-16 Posts: 1036

Not sure if this is related, but the "create kanji avtar" bit under your profile on the forum is now broken. The URL's aren't valid anymore.

Koos83 Member
From: The Netherlands Registered: 2009-08-26 Posts: 318

And I'd really like the place where you can download your progress into Excel or another programme to make a nice spiffy table thingy. smile

It used to be: http://kanji.koohii.com/status/export.php

Sorry for sounding like a total computer noob. XD

  • 1