It can be tough to figure out which wires go where, once you cut off the 1/4" jack and expose the wires. The best way is to get access to the drivers and then test for continuity from there. I've never been inside a pair of K501s so I don't know what you're going to see.
If the wires are color-coded it could be easy... typically, left and right are different colors and then ground is a color all its own as well.
Best this to do if you can't get inside the drivers first to test which is ground and which is signal is to cut the 1/4" plug off at an angle...that way you can only "put it back together" one way. that is, if you cut the wire at an angle, if you try to match the cut part up with the main cable it will only fit back a certain way, then you can see which wire mate to those on the plug end and test for continuity...it's a pain in the ass, but may be the only way.
You might want to talk to Highflyin9 as well, I think he's recabled some K501, so he might have a better idea of what to expect.
Cheers,
thrice