我有一个wordpress网站,我在wordpress的根目录中添加了一些.html页面。现在,我想将index.html页面设置为testdomain.com的默认页面,然后从页面中删除.html以像wordpress URLS一样工作。我可以在.htacess中添加任何代码来工作吗?
我已经在.htacess中尝试过此代码,但是没有用。
DirectoryIndex index.html index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]