Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialSimon Smith
722 PointsLocalhost site buttons don't work, but adding /whatever to the URL does. Why?
I thought I followed the instructions correctly, but like the title says, my site buttons don't function. Clicking on "Tracks" gets me this page:
"Not Found The requested URL /tracks was not found on this server."
I can still navigate to the pages by manually adding type to the url (ex, making http://localhost:8000 into http://localhost:8000/tracks), but that's the only way I can do it.
Can y'all help me understand what might be going on here? I tried poking around the Laravel code and checking Stack Overflow, but no luck.
Michael Driver
22,331 PointsWhat's probably going on is that the links are removing your port number (:8000). If you go into your env file for the project and change APP_URL from http://localhost to http://localhost:8000 and restart your development environment it should work.
3 Answers
Matt Roger
15,066 PointsIn the .env file change APP_URL from APP_URL=http://localhost to APP_URL=http://localhost:8000. Then reset your server.
Steven Jackson
11,465 PointsAlso, make sure your server is configured to use localhost:8000 .
Elinor Armsby
13,987 Pointsthank you! I was pulling my hair out as to why the links didn't work!
Dario Preglej
9,771 PointsDario Preglej
9,771 PointsI have the same problem and i dont know how to fix it!