[wp-trac] [WordPress Trac] #40322: Wordpress Network htaccess rewrite causes internal loop

WordPress Trac noreply at wordpress.org
Thu Mar 30 23:24:19 UTC 2017


#40322: Wordpress Network htaccess rewrite causes internal loop
---------------------------+-----------------------------
 Reporter:  davidsword     |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Rewrite Rules  |    Version:  4.7.3
 Severity:  normal         |   Keywords:
  Focuses:  multisite      |
---------------------------+-----------------------------
 Spam bots and bad links flood /wp-content/* with bad requests causing 404.
 In a clean Wordpress network (on Ubuntu 16.04.2, Apache 2.4.18, PHP 7.1)
 These 404's go in a redirect loop, flooding error logs.

 There's a very well written and detailed explanation of problem and an
 offered solution here:

 https://gist.github.com/JustThomas/141ebe0764d43188d4f2

 in short, he suggests adding

 {{{
 RewriteCond %{REQUEST_URI} !^/wp-(content|admin|includes).*$
 }}}

 above

 {{{
 RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
 }}}

 or removing the question mark in the RewriteRule solve this problem.

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


More information about the wp-trac mailing list