How to remove HTML Extension from a URL?

241 Views Asked by At

Is there any way to remove the .html from a URL? I haven't host the site yet. Existing URL is "file:///E:/SampleWorks/Download.html" and I would like to change it to "file:///E:/SampleWorks/Download". How can I do this?

1

There are 1 best solutions below

4
On

No.

Changing URLs so they don't map directly on to the file system is the province of an HTTP server (which you aren't using).

The only other means to play around with what is displayed in the address bar is the history API but:

  • The browser wouldn't find Download.html if it had been told to use Download and the user hit refresh
  • Security restrictions on documents loaded over file: scheme URIs generally prevent the history API from working