Which preposition to use with "rename"?

Solution 1:

“Rename A to B” is common and correct. “Rename A as B” is uncommon and correct. I think “Rename A by B” doesn't make sense, and I regard it as wrong.

Solution 2:

You can have "Renamed A to B" (most common), "Renamed A as B" (less common) and "Renamed A, B". This last is not common, but is found in other related forms because "A was renamed to B" and "A was renamed B" or "A will be renamed to B" and "A will be renamed B" are all found.

By here would refer to how something was renamed. "A changed his name to B by deed-poll", "Renamed A to B by the mv command", and so on.