Today I found my .htaccess scrambled with the common rules of WordPress added to the beginning if the file and truncating a lot of custom rules.
I think the problema was due to an odd issue while connection with a temporary FTP client to edit the file.
On WP core (misc.php line 37) there is
if ( $markerdata = explode( “\n”, implode( ”, file( $filename ) ) ));
but if the file for some reason (auto text correction by FTP clients) has only a \r as end line… the rest of the function code likely scramble the .htaccess file.
Can be solved with a pre-code doing a replacement for \r\n to \n and then \r to \n.
My 15$ tip… the price to restore a backup, ihihihih…
- The topic ‘Changing proposal for .htaccess generation/manipulation’ is closed to new replies.