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 trialKonrad Hunter
3,629 Pointshow to remove '.html' from webpage
I've got my basic website working, but I want to remove '.html' from the pages as it looks better on busisness cards etc. How can I do this? Thanks
example. my gallery page is konradhunter.com/gallery.html I want it to read konradhunter.com/gallery
3 Answers
Jennifer Nordell
Treehouse TeacherHi there! You will need to create a .htaccess
file which tells the site what to show and how to direct the page. I found an older post with instructions on how to do this.
Take a look at this thread
Hope this helps!
Ari Misha
19,323 PointsHiya Konrad! Can i ask how did ya make your website? Like is it all HTML5, CSS3 and JavaScript?
Konrad Hunter
3,629 PointsHi Ari, My site used HTML and CSS. Not sure on the number just whatever workspace uses. No Javascript.
Konrad Hunter
3,629 PointsUhm... So the .htaccess file worked, but is causing trouble. When I type in my home page konradhunter.com it gives me the following 403 error.
Forbidden
You don't have permission to access /.html on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.
Konrad Hunter
3,629 PointsKonrad Hunter
3,629 PointsGot it sorted. Thanks ;)