seo-by-rank-math
seo-by-rank-math copied to clipboard
[Redirections]: saving an 'Exact' type of Source URLs strips the starting / if any
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:
- Add a new redirection rule that compares with
Exact
, the source url should start with/
. - Click on
Add Redirection
- Works as expected, but export to
.htaccess
file and update your site to include the new.htaccess
file - Disable the redirection rule from above so your website
.htaccess
takes control of this redirection. - 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