CSS
-Tricks
treehouse :
what would you like to learn today?
Web Design
Web Development
iOS Development
Show search box
Search
Search in:
All
Articles
Forums
Snippets
Videos
✕
Home
Forums
Snippets
Gallery
Videos
Almanac
Demos
Lodge
Navigation 'n' Search
Forums
Illustration by Nick Sirotich
Forums
»
Other Discussions
.htaccess
Ben_Derby
Permalink to comment
#
October 2011
Hey,
Using htaccess how do you remove .html from the url?
Thanks
chrisburton
Permalink to comment
#
October 2011
http://css-tricks.com/snippets/htaccess/remove-file-extention-from-urls/
Ben_Derby
Permalink to comment
#
October 2011
i tried that and it didn't work :(
chrisburton
Permalink to comment
#
October 2011
Where did you put the .htaccess file?
Ben_Derby
Permalink to comment
#
October 2011
just dropped in with the rest of the files as the hosting company said to do that and I'm not sure how to access the file root.
chrisburton
Permalink to comment
#
October 2011
Should say "public" or "home". Ask your hosting company where it is.
Add this to the .htaccess file in the ROOT directory of where these files are. Obviously this will only work with a page named "about.html".
RewriteEngine On
RewriteRule ^about$ about.html [L]
Add a Comment
Using htaccess how do you remove .html from the url?
Thanks
Add this to the .htaccess file in the ROOT directory of where these files are. Obviously this will only work with a page named "about.html".