3

I have recently found a .htaccess trick in which I can remove file extension from the URL, example.com/file.html looks like example.com/file

Now my humor says that I can replace any extension to my own, I want example.com/file.html to be example.com/file.syml

Is this possible?? or I am just daydreaming?? If this isn't possible then how does Microsoft uses MSPX, I think MS stands Microsoft.

4

The AddType directive lets you specify what MIME type(not entirely a complete list) a given file extension should be processed as. To make an arbitrary extension be processed as HTML:

AddType text/html .whatever

Note that there's generally very little reason to do this sort of thing, and it mostly just introduces maintenance work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.