Hello,
We apologize for the issue you are facing with URL redirection. To remove URL parameters and redirect a URL like https://rankmath.com/kb/how-to-setup/ to
https://rankmath.com/kb/how-to-setup/ you can set up a redirection rule in your .htaccess
file. Here’s how you can do it:
Steps to Redirect URL with Parameters
-
Edit .htaccess File: You can edit your website’s .htaccess
file from the WordPress dashboard by navigating to Rank Math > General Settings > Edit .htaccess.
-
Add Redirection Rule: Add the following code snippet to your .htaccess
file after #END WordPress
:
RewriteEngine On
RewriteCond %{QUERY_STRING} sad
RewriteRule ^support/$ /support/? [L,R=301]
This rule checks if the query string contains sad
and redirects to the clean URL without parameters.
-
Save Changes: After adding the code, make sure to save the changes.
If you have any further questions or need assistance, feel free to reply to this ticket, and a human agent from the Rank Math Support team will assist you further!
Sources:
How to Redirect Non-WWW Version to WWW Version of Your Website » Rank Math
How to Set Up Redirections » Rank Math
Hello,
Thank you for contacting us and bringing your concern to our attention.
In order to redirect URLs with query parameters, please use the following filter code on your website:
add_filter( 'rank_math/redirection/add_query_string', '__return_false' );
Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps and please don’t hesitate to let us know if you have any other questions.
Â
Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.