Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you remove a .html extension or any extension using an .htaccess file?

share|improve this question

migrated from Dec 10 '09 at 14:01

This question came from our site for professional and enthusiast programmers.

Google is your friend :-)

Take a look at this article.


RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html


share|improve this answer
Agreed - just make sure that mod_rewrite is enabled and the above snipped should do what you need. – EEAA Dec 10 '09 at 16:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.