[wp-trac] [WordPress Trac] #51495: The code in mod_rewrite_rules() to write to .htaccsess is wrong.

WordPress Trac noreply at wordpress.org
Mon Oct 12 17:42:51 UTC 2020


#51495: The code in mod_rewrite_rules() to write to .htaccsess is wrong.
---------------------------+-----------------------
 Reporter:  nendeb55       |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.6
Component:  Rewrite Rules  |     Version:  trunk
 Severity:  critical       |  Resolution:
 Keywords:  has-patch      |     Focuses:  rest-api
---------------------------+-----------------------
Description changed by SergeyBiryukov:

Old description:

> Code in the rewrite_rules function
>
> {{{#!php
> <?php
> $rules .= 'RewriteRule .* -
> [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]';
> }}}
>

> 1.There are no newlines, so the next line comes after it.
> 1.The ".* -" in is not "^(.*) -" in RewriteRule.

New description:

 Code in the rewrite_rules function

 {{{#!php
 <?php
 $rules .= 'RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]';
 }}}


 1.There are no newlines, so the next line comes after it.
 1.The `.* -` in is not `^(.*) -` in RewriteRule.

--

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51495#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list