Search code examples
wordpress.htaccess

.htaccess file modifying automatically


I have website powered by WordPress and I also have .html files inside WordPress root folder since WordPress will not allow .html files , I have written .htaccess code to open .html files as well as wordPress pages but the problem is .htaccess file is modifying automatically and .html files will not work

What is causing this ?

my .htacces code

enter image description here


Solution

  • WordPress modifies the .htaccess file if necessary, but only the content of the #BEGIN ... #END WordPress block. Add your own entries outside of this block and WordPress will not touch them.

    Another option is to remove write access for the webserver to the file, so WordPress can't modify it directly. WordPress will tell you to change the file if necessary.