[wp-trac] [WordPress Trac] #43676: .htaccess rules don't work with Plain

WordPress Trac noreply at wordpress.org
Mon Apr 2 21:03:50 UTC 2018


#43676: .htaccess rules don't work with Plain
------------------------------+-----------------------------
 Reporter:  sebastian.pisula  |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Rewrite Rules     |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 If I use "Plain Url Style" in Permalink Settings then I can't add custom
 rules .htaccess from mod_rewrite_rules filter. I think that this is bug.

 For example:

 {{{#!php
 <?php
 function uploads_from_remote_server( $rules ) {
         $rules = "<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule wp-content/uploads/(.*) http://example.com/wp-
 content/uploads/$1 [NC,L]
 </IfModule>\n\n" . $rules;

         return $rules;
 }

 add_filter( 'mod_rewrite_rules', 'uploads_from_remote_server' );
 }}}

 This filter not working in Plain Url Style but should.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43676>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list