Nginx remove html from url

If you have a static website build using plain html files, your url will look like https://yourdomain/page.html. This .html extension is useful for the files when it is on your local computer, it help computer to associate the file with specific application, say your HTML editor. But on a web server this .html extension serve no purpose. If you are using Nginx web server, you can remove .html extension from your web page urls with following code.

Remove .php extension

To remove .php etxension, you can use

See Nginx

Leave a Reply

Your email address will not be published. Required fields are marked *