Search code examples
htmlurlwebserverprettify

How do you get rid of .html url extension?


I'm attempting to 'prettify' my urls by getting rid of the .html url extensions. Upon researching similar questions, it seems a .htaccess file is require to change this, but all I have available with the particular server I'm hosting with is a web.config file. I do not know where to begin. Thanks in advance for any help.


Solution

  • I went with @BalintBako's solution above, and since it's not a comment I can't "accept" it as the answer. So here is the answer with credit to him.

    I made a folder for each page (i.e. /about, /portfolio, /contact, /etc) and put an index.html file in each of those folders. This made it so you can reach those pages via direct link (webdomain.com/folder) and it would render the HTML that I have in the index.html file, therefore eliminating the .html extension for user friendliness. Pretty simple fix without any limitations from my knowledge.