The answer to 'how to fix rewiring' is to hire a licensed and experienced electrician to safely and properly rewire your home. Rewiring is a complex and potentially dangerous task that requires expertise to ensure the electrical system is up to code and functioning safely. Attempting to rewire your home without the proper training and tools can lead to serious electrical hazards, fires, and even electrocution.
A professional electrician will be able to assess the condition of your existing wiring, identify any issues or code violations, and develop a plan to safely and efficiently rewire your home. They will also be able to handle the permitting and inspection process to ensure the work is up to local electrical codes.