Blog » Custom Redirects in .htaccess Disappearing from WordPress Site?

Custom Redirects in .htaccess Disappearing from WordPress Site?

A number of WordPress that we manage have been “losing” the custom 301 directives that we or our clients have been putting into the .htaccess file. This has been a very random and disconcerting issue.

Recently, we discovered that this was happening whenever someone saved the Permalinks Settings in WordPress.

Alternative solution? Make the file read-only until you need to edit it again. Or at least set up the permissions so that the webserver can’t overwrite the file. Problem solved…

In most cases this means setting the permissions on this file to 660 or 644 as described in this Codex article.

Michael Gibbs
Stalk Me...
Latest posts by Michael Gibbs (see all)