For the record, the linked question asks:
Is there any better way to do this?
I believe that is the question we all want the answer to when posting code here, more or less.
Is a question that asks for a complete rewrite of a piece of code is acceptable in Code Review.SE?
It depends on how it is asked.
If you ask "Can someone please rewrite this code for me?" that is likely to be downvoted.
If you ask "Can this be done in a different way?", then yes that is acceptable.
Are answers that suggest complete rewrite of the code acceptable?
Yes. Always. But not a code-only "Here is how I would do it" answer.
Note that a question asked: "Can this be done in a different way" does not require any code in the answer. A hint, description, alternative algorithm can be suggested as "words", not as "code". Which makes it a code review request, not a "gimme-tez-code"