Opened 12 years ago
Closed 11 years ago
#5376 closed defect (bug) (wontfix)
rules added via mod_rewrite_rules should be in IfModule section
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.3.1 |
Component: | General | Keywords: | mod_rewrite mod_rewrite_rules |
Focuses: | Cc: | ||
PR Number: |
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 (3)
Note: See
TracTickets for help on using
tickets.
By just glancing at this, It seems that in the current state, that filter can be used to filter the entire contents of what will be written to the .htaccess, Moving the filter would remove flexibility to plugins to completely remove the WordPress generated code..