Make WordPress Core

Opened 10 years ago

Closed 5 years ago

Last modified 5 years ago

#40322 closed defect (bug) (duplicate)

WordPress Network htaccess rewrite causes internal loop

Reported by: davidsword Owned by:
Priority: normal Milestone:
Component: Rewrite Rules Version: 3.3.2
Severity: normal Keywords:
Cc: Focuses: multisite

Description

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.

Change History (2)

#1 @bradleyt
5 years ago

  • Resolution → duplicate
  • Status new → closed
  • Summary Wordpress Network htaccess rewrite causes internal loop → WordPress Network htaccess rewrite causes internal loop

Duplicate of #20746. See also #34683

#2 @desrosj
5 years ago

  • Milestone Awaiting Review
  • Version 4.7.3 → 3.3.2
Note: See TracTickets for help on using tickets.