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
  • 6,752
  • 18
  • 67
  • 115

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
  • 311,322
  • 76
  • 447
  • 566
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
  • 2,916
  • 1
  • 19
  • 31