Removing Category and Product from URLs

  • Hello,

    We need to configure Rank Math on our WooCommerce website – in addition to the wonderful SEO features – we need to remove category and product from URLs

    We switched ‘On’ Remove Base and Remove Category Base – but this is turning out to be hit and miss. As in, we are running into 404 errors and to guard against, my dev went back to setting it ‘Off’

    Our Permalink structure is a shown in attached screenshot. Please suggest the right permalink and redirection settings, and any other configuration to make this work correctly.

    Thanks

    • This topic was modified 4 days, 20 hours ago by Revenew.
Viewing 15 replies - 1 through 15 (of 16 total)
  • I also set this function to “On” for Strip Category Base, but like the other indidviual, it did nothing. I guess I will just change it inside Permalinks and Do a 301 Redirect, although time consuming.

    Edit: I initially misunderstood the feature. I thought it would strip the /{category}/ of post pages. What it does is strips strips the word /category/ from archive pages url structure. So, I still had to go into Settings > Permalinks to remove /%categories% for post pages and then do a 301 redirect.

    • This reply was modified 1 week, 3 days ago by Dee.
    • This reply was modified 1 week, 3 days ago by Dee.

    We are having the same issue. Everything works when logged in but works on and off when not logged in. Please help soon!

    Hi,

    Thanks for getting in touch with me.

    If you are facing an issue using the strip URL features, please talk to your web hosting provider.

    It is possible that your .htaccess file is not writeable and/or it gets reverted back due to some cron job on your website.

    Please talk to your web host and let us know what they say.

    This option is working fine in all our tests and 99.9% of the users. So, it definitely has to do with the server setup more than it has to do with Rank Math.

    Hope that helps.

    Hi Todd, Thanks for the reply. I did check with my host (WPMUDEV) and they said they use nginx.conf… and htaccess does not apply. Any recomendations if your sever is Nginx?

    Hello,

    Well, then you should check if there is any issue there since redirections could be having troubles there.

    Also, meanwhile, it has nothing to do with this, since you said you didn’t set any custom config in your Nginx server, you also had to set this code in the Nginx configuration:

    # START Nginx Rewrites for Rank Math Sitemaps
    rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
    rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
    # END Nginx Rewrites for Rank Math Sitemaps

    Looking forward to help you.

    Hello,

    I want to add that the above code my colleague shared only related to the sitemaps.

    We might need to take a closer look at the settings. Please 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.

    I have the same problem. What is the solution for that? May you can help me also?

    Hello Domantas,

    Thank you for contacting Rank Math today.

    Please ensure you have the latest Rank math plugin installed and active. If the issue still persists, please create a new ticket and include your WP access credentials in the designated sensitive section so we can look into it further

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hello,

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

    Thank you.

    Heyy Todd, Michael

    I have added my store URL and login details. Would be great if you could have a check and perhaps update the necessary settings (without ht.access breaking). For your info, we are on Linode.

    Also, please check if it needs any review of Redirection settings (don’t know if removal of ‘category’ and ‘product’ from URLs qualifies as a redirect).

    We were earlier getting 404 time and again – and hope this can be avoided when you turn ‘Removal of category and product’ back on

    Thanks, look forward to a resolution.

    @Revenew @Domanta did you guys also strip the product base? for me products are working fine, it is only the category base stripping that’s causing issues.

    Hello Revenew,

    Thank you for contacting Rank Math today.

    I have tried the store URL you have provided but it seems to be inaccessible, would you please check and let us know.

    Looking forward to helping you. Thank you.

    ​​​​​​

    Hey Michael,

    It was experiencing some server issues earlier but now those have been resolved

    I did a copy-paste now and it loaded fine. Could I request you to please retry?

    Look forward to a resolution to this. Thanks!

    Hello Revenew,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    I updated Rank math to the latest version on your site and this seems to have resolved your issue.

    Could you please check and confirm, do not hesitate to let us know if you need our assistance with anything else.

    Hello,

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

    Thank you.

Viewing 15 replies - 1 through 15 (of 16 total)

You must be logged in to reply to this ticket.