Ticket #5376 (assigned defect)

Opened 1 year ago

Last modified 1 year ago

rules added via mod_rewrite_rules should be in IfModule section

Reported by: mastermind Assigned to: westi (accepted)
Priority: normal Milestone: 2.9
Component: General Version: 2.3.1
Severity: normal Keywords: mod_rewrite mod_rewrite_rules
Cc:

Description

When mod_rewrite rules are added via the filter mod_rewrite_rules, the rules should be inserted within the <IfModule mod_rewrite.c></IfModule> tags. At the moment, this is not the case, instead they are appended outside this section.

This shouldn't be a problem on most hosts. Still, it's ugly, and it should be easy to fix by putting the line $rules .= "</IfModule>\n"; just before the return argument in the function mod_rewrite_rules() in wp-includes/rewrite.php (i.e. after the filters are applied).

Change History

11/22/07 12:26:59 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.