Make WordPress Core

Opened 8 years ago

Closed 3 years ago

Last modified 3 years ago

#40322 closed defect (bug) (duplicate)

WordPress Network htaccess rewrite causes internal loop

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

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
3 years ago

  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from Wordpress Network htaccess rewrite causes internal loop to WordPress Network htaccess rewrite causes internal loop

Duplicate of #20746. See also #34683

#2 @desrosj
3 years ago

  • Milestone Awaiting Review deleted
  • Version changed from 4.7.3 to 3.3.2
Note: See TracTickets for help on using tickets.