我有一个内置的网站,.php但我们已经.html使用"mod rewrite"将其转换为.使用的mod重写代码.htaccess是
RewriteEngine on
RewriteRule ^(.*)\.html$ $1.php
Run Code Online (Sandbox Code Playgroud)
现在问题是我的网站出现在.php和.html.
例如:www.mydomain.com/index.html还有www.mydomain.com/index.php.
据我所知,它不利于搜索引擎的目的,也可能是搜索引擎的重复内容.
所以我想只保留.html [not .php]搜索引擎和用户的网址.
怎么做?