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 trial

General Discussion

John Sawyer
John Sawyer
1,305 Points

Changing Pages in HTML

I am just learning how to switch pages in HTML (from index to About). It is working just fine when I hit my "about" button in my Nav section, but when I click my "home" button again, it goes directly to a generic "404 Not Found" error page.

The web address it's trying to go to is http://web.9zghy12qla.treehouse-app.com/index.html.

I created additional pages and am copying/pasting exactly what is in my index.html page, and only changing the "class selected" line. They click between each other perfectly when I chose each item in my Nav area. For some reason going back to my index.html doesn't work from any of them though?

Thanks.

2 Answers

Michael Austin
PLUS
Michael Austin
Courses Plus Student 7,814 Points

Hi,

It’s to do with case sensitivity. What you’ll typically find is that Linux servers are case sensitive on file names, whilst Windows is not (but this isn’t always the case).

In your case your homepage url is actually: http://web.9zghy12qla.treehouse-app.com/index.html (lowercase i for index)

Whilst in your menu you point to: http://web.9zghy12qla.treehouse-app.com/Index.html (uppercase for I in Index)

For the norm I would always name html files with lowercase. This makes it the standard you work to, that avoids any case sensitivity issues.

As a side note you can also just use <a href=“/“>Home</a> when pointing to the homepage of a site.

Thanks

Looks like your href for the "Home" link is set to index.html on the index.html, but on all other pages is set to home.html. I'm assuming you want those to be the same ( i.e., either index.html or home.html ). I'm not, however, seeing the 404 error so I'm guessing that has been fixed.