This question could be divided into 2 sides - personal side projects and paid work. For both, you can ask yourself the same question:
Is there a reason the old way no longer works or is no longer viable?
A very important concept for programmers to learn is that time is money. We are almost like lawyers in this respect. Every hour you spend should be billable. If the client / customer / company isn't paying for it, it shouldn't get done.
So if you have a personal side project that did something unique from your other projects, and you want to try to redo that project in a new framework / language - sure! Go ahead. Personal side projects (not billed) can be done in whatever you'd like, how ever many times you want to do them.
But if your working for a company; if someone paid you to do a job, those hours should be billable. And unless the new framework / language introduces a feature the project could use, the customer, under most circumstances, would never pay for that.
There are many caveats to this obviously -
Maybe this new way does something really cool that the old way didn't and you want to show it to the boss and get them to approve it. In this case, any website > 2 pages will need to vet the new language / framework and be discussed.
Maybe you scoped the project wrong and this new way is really a better way then the old way. In this case, you can discuss this with the client, propose the new way and see if they want to pay for it.
Maybe the customer is unhappy and you want to provide a value add. Here, you might be better off giving a refund of sorts.
Going back to the side projects; an employer would be much more impressed to see multiple projects in different languages / frameworks on a portfolio then to see all of them in the same language / framework. It shows diversity, it shows options and it shows the ability to learn. If every project you have is in 1 language, then you've become very niche. If you show projects spanning 3 or 4 languages, that makes you diverse and leaves room for the company / client to have options in the future with the same programmer.