Why not "Du kannst nicht mich ersetzen"? It is cannot, so nicht follows kannst.
No. In German, nicht comes before the verb to negate it. Ersetzen is the verb to be negated.
This is a reply to a previous Duo lesson where you learn to say "You are replaceable"
Why not "du kannst nicht mich ersetzen" ? Shouldn't "nicht" stay near the verb negated ?
The reflexive pronoun goes after the verb in a Hauptsatz, even where there is a negation. The folowing link explains the positioning of the reflexive pronoun in Nebensätze and more complex scenarios http://german.stackexchange.com/questions/6474/where-to-place-sich-in-an-elaborate-sentence
"Nicht" as a general rule tends to be after the subject, object, and second position verb, too. That's what I used to avoid getting this one wrong, anyway
Does it mean that "you cannot replace me by yourself" or "you cannot replace me by someone else?" Or both?
"You cannot replace me by someone else" is in German: "Du kannst (Sie können) mich nicht durch einen anderen ersetzen."