WordPress.org

Make WordPress Core

Opened 15 months ago

Last modified 15 months ago

#44899 new defect (bug)

redirect_canonical redirects to another URL when it should not

Reported by: melicerte Owned by:
Milestone: Awaiting Review Priority: normal
Severity: critical Version: 4.9.8
Component: Canonical Keywords: needs-patch needs-unit-tests
Focuses: Cc:
PR Number:

Description

Hi,

on a fresh install of WordPress 4.9.8 :

http://sub.yourdomain.com/?xtor=AD-4970-%5BSocial%5D-%5B%5D-%5BPPL%5D-%5BFacebook%5D-%5B228284160&105478095%5D-%5B0%5D

will be redirected to :

http://sub.yourdomain.com/?xtor=AD-4970-%5BSocial%5D-%5B%5D-%5BPPL%5D-%5BFacebook%5D-%5B228284160&105478095]-%5B0%5D

Problem is : it does an 301. And, combined with Facebook mobile on Iphone link to the WordPress, it retries forever. 21 000 hits / 5 minutes on our server. Glad it was strong enough to sustain until we find the bug and temporarily deactivated

redirect_canonical

with :

<?php
remove_action('template_redirect', 'redirect_canonical');

Change History (2)

#1 @melicerte
15 months ago

  • Summary changed from redirect_canonical redirects to another URL to redirect_canonical redirects to another URL when it should not

#2 @SergeyBiryukov
15 months ago

  • Component changed from General to Canonical
  • Keywords needs-unit-tests added
Note: See TracTickets for help on using tickets.