1

Possible Duplicate:
How to remove .html from URL

i have created a website in a software I own. The software uploads the site through an FTP server. For some reason, all the pages have .html at the end. My problem is if the user says www.mydomain.com/live instead of www.mydomain.com/live.html, they get a 404 error. How do I fix this to where they do not have to add .html at the end of the pages?

Community
  • 1
  • 1
Hunter Mitchell
  • 7,063
  • 18
  • 69
  • 116

2 Answers2

1

You can do this with a simple .htaccess file:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
1

Another possibility is this: put the content into live/index.html. Then, requests to /live are usually redirected to /live/, which is then served from live/index.html.

tiwo
  • 3,238
  • 1
  • 20
  • 33