[Solved] How to solve if chrome using an incorrect local IP Address in Laravel?

Article Tarif Hossain

Problem :

I am working in a local environment on my windows PC.  I am using a static local IP address of 192.168.0.100:8001. Then I am factory reset my router and now I have 192.168.1.99 and I can access my local site by localhost:8001 but my AJAX request still redirecting to my old static IP address 192.168.0.100:8001. Nothing is working.

Solution :

You can change APP_URL in your .env file. For use on localhost. Just define their APP_URL as localhost and then don’t forget to run the below commands.

php artisan route:clear 
php artisan view:clear 
php artisan view:cache 
php artisan config:cache 
php artisan optimize:clear

It’s all about this issue. Hope that solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below this solution worked for you?