Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

WP updates will overwrite the htaccess?

         

deeper

4:04 am on Aug 27, 2014 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi,
can anybody tell, what WP Updates (small ones like 3.9.1 --> 3.9.2 or bigger ones like 3.9 --> 3.10, 3.9 --> 4.0) will overwrite my custom htaccess code?

lorax

11:44 am on Aug 27, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If your code is outside the # BEGIN WordPress and # END WordPress tags in the .htaccess file then it will not be overwritten.

To my knowledge, it hasn't been updated in quite a while. If you change the default code between the WordPress tags, then yes, it will be updated the next time WordPress checks the htaccess file (I'm not sure when this happens) and definitely when you update permalinks or have a plugin that writes to the htaccess file.

phranque

9:52 pm on Aug 27, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



according to WP...

http://codex.wordpress.org/Using_Permalinks#Using_.22Pretty.22_permalinks
WordPress will play nice with an existing .htaccess and will not delete any existing RewriteRules or other directives. If you have other mod_rewrite rules, put yours before WordPress's.


i assume "other mod_rewrite rules" are those outside the standard WP comments envelope:
# BEGIN WordPress
RewriteEngine On
...
# END WordPress

deeper

11:40 pm on Aug 27, 2014 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks! Good to know regarding the question if prefering a merged htaccess-code or splitting it into "parts".
Probably I will prefer parts and one of the parts will be the "BEGIN WP ... END WP".

Or are there any further reasons against this? Performance?

lorax

10:37 pm on Aug 28, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



i assume "other mod_rewrite rules" are those outside the standard WP comments envelope:


Yes.