it tries to load
Don't understand
it ?
What command did you enter ? Should be related to your browser cache ...
What's your APP_URL vs your web server & D?S config?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
When I run
php artisan config:clear
Configuration cache cleared!
php artisan config:cache
Configuration cache cleared!
Configuration cached successfully!
I can no longer load routes to published sites. I mean, it tries to load the route to the application's domain instead, not the published site like sub.domain.test. It just tries to load domain.test (main app domain) . However when I then run:
php artisan optimize
Configuration cache cleared!
Configuration cached successfully!
Route cache cleared!
Routes cached successfully!
Files cached successfully!
all is well again. Any ideas why this could be the case? Does the cache clearing remove the routes' cache too? But why would it not be cached on running php artisan config:cache then?
You are relying on some value from the .env file somewhere (probably) in your wildcard routing.
never use .env values outside of configuration files.
Please or to participate in this conversation.