Rules disappearing from htaccess | WordPress.org

Where did you insert it in the file? Ideally, it should be BEFORE the code that WordPress inserts.

As an alternative to this file editing, you can also use various plugins that take care of such redirects for you. Examples: https://projectdmc.org/plugins/tags/redirect/

thank you @threadi I added between BEGIN WordPress and # END WordPress. Should I think more about this, or I can ignore the fact that it disappeared?

You should never add anything to this area. For a German WordPress installation, it also says here (translated for you):

# BEGIN WordPress
# The instructions (lines) between “BEGIN WordPress” and “END WordPress” are
# dynamically generated and should only be changed via WordPress filters.
# All changes to the instructions between these markers will be overwritten

If you want to make additions, then BEFORE this code or via plugin, as described above.

thank you @threadi for this important suggestion. I didn’t know that and even in the forum of yoast they told me I had to add the code between BEGIN WordPress and # END WordPress.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer