Today I tale about some common problem with htaccess file. If you are a website designer, owner, or just run a hobby blog on wordpress you may face a frustrating reset of this file. So in this post I am tell you why is this problem happening and how to resolve it.
What is htaccess
In wordpress it is very common file. If you don’t know about this file check our post about htaccess file. This file is use for many reason like as security, redirection and many more.
Why htaccess file reset
Sometime you notice that your htaccess file is reset to wordpress default. It may happening for many causes but mostly for plugin. Some common plugin use this file for security reason or speed improvement. But when you deactivate those plugin the result is a htaccess reset.
Let me explain why this happening. When you activate a plugin that need this file, it may paste some code on your htaccess file to run properly. But when you deactivate this plugin it try to remove code, paste by it. Unfortunately some time it could not understand which one to remove, as a side effect the plugin remove the whole code. As you know to run wordpress you need a default htaccess file so wp automatically paste it for you. As result you lost every thing that you edited.
If you paste some code for security reasons your site became unsafe. And may compromise by a bad gay.
How to safe htaccess from reset
So if you find those problem may this can help you. Remember to backup htaccess before every change. Every time you edit this file from your host. Editing it trough host safe site you from any problem.
Remember your hash tag. Everytime you edit do remember to add it between a hash tag.
# My Code
some htaccess code
# END My Code
Most of plugin use there own hash code for identify that code parts. So that related code part is easily removed. But when you add your own code between plugin hash tag. Your code is also delete. So keep it practice to paste your code on your own hash tag.
Hope you understand the solution. If you have and question or suggestions leave it on comment box. And follow me on socially and never forget to subscribe our mailing list.