How we can replace .php ext with .html through .htaccess for root files only not subdirectoy files.
Example : www.test.com/home.php should be change to www.test.com/home.html but www.test.com/admin/home.php should remain same.
I simply tried as below:
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} (.*)\.php
RewriteRule ^(.*)\.php $1.html [R=301,L]
RewriteCond %{THE_REQUEST} (.*)\.html
RewriteRule ^(.*)\.html $1.php [L]
Please assist me.