Redirections via htaccess export are not working

#83694
  • Resolved Fuad
    Rank Math free

    Hi there, I’m trying to enable htaccess redirects instead of all in the RankMath plugin for performance reasons (I have nearly 1000).

    However, when I export to htaccess via RankMath’s “export to .htaccess” function and copy one simple rule over into my htaccess file, it doesn’t work. it returns a 404.

    RankMath exports using “RedirectRule … [R=301,L]” logic. But when I add that, it isn’t working. It’s worth noting that other RedirectRule rules (such as “RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L])” work fine, but none of the RankMath rules.

    However, when I convert that into a “Redirect 301 …” rule, it works fine. I’ll paste the actual specific rules used in Sensitive Data.

    Thank you for your help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    Can, you please share a screenshot of the settings for that particular redirect in Rank Math? Are you using regex, exact, contains? What type of redirect are you exporting?

    Fuad
    Rank Math free

    Hi, here’s a screenshot of the exact redirect in RankMath: https://i.gyazo.com/5dfa52527c25b770aa02eff2c79ee1d2.png

    The screenshot answers all of your questions – it’s just a simple URL -> URL exact match 301 redirect.

    Thanks,
    Chris

    Alberto
    Rank Math business

    Hello,

    I think we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Fuad
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Fuad
    Rank Math free

    Hello, any udpates?

    Hello,

    Sorry for not following up quickly and any inconvenience that might have been caused due to that. I was able to reproduce the issue on my setup and have logged it. Please allow us some time to test and release a fix. It should be added to the plugin in one of the upcoming updates. You can keep an eye on the changelog and we will be mentioning this error when fixed.

    In the meantime, if you need any other assistance, please feel free to let us know. We are here to help.

    Thank you.

    Fuad
    Rank Math free

    Thank you, but in the meantime, how do I get these redirects into my htaccess?

    Hello,

    Sadly, there is no easy way to change the exported Redirection rules. I would suggest you to use the Rank Math’s Redirection till the time we fix this issue.

    I hope that helps. Please let us know if you need our help with anything else.

    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.

Viewing 8 replies - 1 through 8 (of 8 total)

The ticket ‘Redirections via htaccess export are not working’ is closed to new replies.