.htaccess 495 B

123456789101112131415
  1. Options -MultiViews
  2. RewriteEngine On
  3. RewriteCond %{REQUEST_FILENAME} !-d
  4. RewriteCond %{REQUEST_FILENAME} !-f
  5. RewriteRule ^([^\.]+)$ $1.html [NC,L]
  6. #PRODUCTION remove extension and add trailing backslash
  7. #RewriteEngine On
  8. #RewriteCond %{REQUEST_FILENAME} !-f
  9. #RewriteRule ^([^/]+)/$ $1.html
  10. #RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.html
  11. #RewriteCond %{REQUEST_FILENAME} !-f
  12. #RewriteCond %{REQUEST_FILENAME} !-d
  13. #RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
  14. #RewriteRule (.*)$ /$1/ [R=301,L]