seo-by-rank-math icon indicating copy to clipboard operation
seo-by-rank-math copied to clipboard

[Redirections]: saving an 'Exact' type of Source URLs strips the starting / if any

Open Nickbahson opened this issue 1 year ago • 0 comments

Describe the bug Saving an 'Exact' type of Source URLs strips the starting / if any, eg try and save /contact-us/ as a source URL, contact-us/ will be saved instead, and when exported to a .htaccess file will fail to redirect as generated under the RedirectMatch (mod_alias).

To Reproduce Steps to reproduce the behavior:

  1. Add a new redirection rule that compares with Exact, the source url should start with /.
  2. Click on Add Redirection
  3. Works as expected, but export to .htaccess file and update your site to include the new .htaccess file
  4. Disable the redirection rule from above so your website .htaccess takes control of this redirection.
  5. Redirection do not work, missing / in the begging of the source url pattern in the .htaccess file.

Expected behavior When a user visits the 'Source URL' they should be redirected the 'Destination URL' as per the .htaccess file

Nickbahson avatar Apr 11 '23 06:04 Nickbahson