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 trialDaniel Paiewonsky
1,092 PointsI can't find the reason the preview sends me to an index of the folders!
I hope someone can help me out. Here's a screenshot of my code :/ http://i57.tinypic.com/5vppnb.png
8 Answers
Dave McFarland
Treehouse TeacherIt needs to be index.html
-- lowercase i in index.
Web servers are setup to serve a default file -- often named index.html -- when no specific file is requested. For example, when you just visit a web site like http://mysite.com/, the web server sees that there is no file specified so it looks for the default -- a file named 'index.html' and send that. Works the same when you specify a folder and not file name: http://mysite.com/folder/
Dave McFarland
Treehouse TeacherHi Daniel Paiewonsky Are you talking about Workspaces? When you preview a page from workspaces, it defaults to the root of the web site. You shouldn't place your index.html file inside a the subfolder named "html". Move it outside that folder up one level and when you preview, that index.html page will load.
Daniel Paiewonsky
1,092 PointsI still get the same error, it takes me to "Index of / "
Dave McFarland
Treehouse TeacherDo you have a file named index.html
in that top level?
Daniel Paiewonsky
1,092 PointsYeah, the file does appear, why?
Dave McFarland
Treehouse TeacherNot sure. Can you take a picture of your workspace and post it in here?
Daniel Paiewonsky
1,092 PointsDaniel Paiewonsky
1,092 PointsYikes, finally I got it, Thanks a lot!