rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Trailing slashes are automatically added to all source URLs regardless of redirection type #111

Closed tristaneason closed 2 years ago

tristaneason commented 2 years ago

Describe the bug On version 1.0.85, the fix: Trailing slash was getting stripped from the Source URL when setting a Redirection this has caused another bug where every single record has a trailing slash automatically added regardless of redirection type. This is causing many redirects to no longer work.

To Reproduce Steps to reproduce the behavior:

  1. Go into Rank Math > Redirections dashboard
  2. Add new redirection or edit existing one
  3. Add any text without a trailing slash and save/update redirection
  4. Click back into the same redirection record that was just edited
  5. New redirection record will show a trailing slash

Expected behavior I expect no trailing slash to appear

Desktop (please complete the following information):

Additional context Commenting/deleting line 318 in the file, /includes/modules/redirectons/class-redirection.php seems to resolve the issue without auto-deleting trailing slashes from existing records.