Copy webpage file extension issue

When you clone the webpage with .html or .php file extension, it ended up like this:

example-file-name.html-copy

Where it should be:

example-file-name-copy.html