Nginx Clean url

319 Views Asked by At

I need clean urls for my website.

Html should be removed from the url name and if a website visitor should be able to visit my website without entering .html.

Can someone help me how to do this with the rewrite feature?

I use the Admin Software Plesk with the nginx Server!

1

There are 1 best solutions below

1
On

You can read from the official blog or you can try something like this. They must be inside location / {}

 http://example.com/page
http://example.com/page.html

rewrite ^/page?$ /page.html last;