Wordpress.htaccess file - add code after #END Wordpress

My .htaccess file for WordPress keeps adding code to make it look like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
AME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

      

I don't need code after the first "# END WordPress"

I don't know what changes it and I just updated WordPress to 3.5 to try and fix the problem, but it still exists: / Does anyone have this problem or do you know how to fix it?


2/5/2013 EDIT: I updated WordPress, my theme (AIT Guesthouse) and WPML plugins and the problem seems to be gone. I'm still not sure what was causing it.

+3


source to share


1 answer


If anyone is still looking for this answer, I recently had to do some research to fix the problem myself.

As it turns out, WordPress can update your .htaccess when you change your permalinks. I ran into the problem, however, based on several paid plugins that I was trying to update. I set the .htaccess file the way I wanted it and blocked any changes to the file by setting the permissions to 644. You can also do 444 if that's not strict enough for you. I am doing SSH, but Filezilla or similar FTP / SFTP program will work.



Also as a tip for being proactive, try keeping your site under version control (I'm using Git via BitBucket) and you might have logs that tell you when and what WordPress will change. Incredibly useful!

0


source







All Articles