Hello! Most of the site’s pages are now with static HTML pages with URLs of this type: www.site.ru/nazvanie-tovara.html. For some requests, the site is in the first position in the search, with the keyword queries are present in the URL pages. Now we are switching to the pages generated by the php script (i.e., there will be only one script, just depending on the URL, it will produce different content). Tell me, please, what is the best way to do it so that during the transition you don’t lose in attendance? And will it not affect the position in the search that we remove from the .html addresses, i.e. let's make a url like www.site.ru/nazvanie-tovara
If the search engine receives a 404 error when a page is requested at www.site.ru/nazvanie-tovara.html, it will throw the page out of the index, the position will be lost, the reference weight will also, therefore, the positions will collapse. It will also take time until he finds the page www.site.ru/nazvanie-tovara, adds it to the issue, the reference mass is typed, and only then it appears in the issue, of course not in the top.
In summary, you need to configure the Mod Rewrite with 301 redirects, then the search engine will very carefully glue the pages and there will be no problems.