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

HTML

Konrad Hunter
Konrad Hunter
3,629 Points

how 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
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi 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! :sparkles:

Konrad Hunter
Konrad Hunter
3,629 Points

Got it sorted. Thanks ;)

Ari Misha
Ari Misha
19,323 Points

Hiya Konrad! Can i ask how did ya make your website? Like is it all HTML5, CSS3 and JavaScript?

Konrad Hunter
Konrad Hunter
3,629 Points

Hi Ari, My site used HTML and CSS. Not sure on the number just whatever workspace uses. No Javascript.

Konrad Hunter
Konrad Hunter
3,629 Points

Uhm... 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.