/blog/tegory%/%postname%/ = broken posts

#596428
Viewing 15 replies - 1 through 15 (of 17 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    I’ve tried accessing your blog page, but it seems to be showing a 403 Forbidden error. However, your homepage and links are working fine.

    Could you please confirm if you have a folder with name /blog/ in your website’s root directory?

    Regarding the permalinks, please try deactivating the Rank Math plugin temporarily and check if they are opening fine.

    If it’s possible, we can take a closer look at your WordPress settings.

    To do that, please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    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.

    Thank you.

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    The app asks me to enter a first name, surname and email to generate login link. What should I add?

    And I wasn’t aware of the blog root not working… I contacted bluehost support yesterday and it seems instead of helping they messed something else up… great support on their side..

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    I’ve provided my login details in the sensitive data section.

    To reiterate:

    I want my website structure to look something like this.

    My website is https://allthingsmin.com
    my blog is https://allthingsmin.com/blog
    then I have a few categories in my blog e.g. “creator academy” / “entertainment”
    and an example post I have posted is “develop-your-branding”

    I want my post URL to look like this
    https://allthingsmin.com/blog/creator-academy/develop-your-branding

    without making any changes it looks like this
    https://allthingsmin.com/develop-your-branding

    I tried changing permalink structure to
    /blog/%category%/%postname%/

    which lead to my posts being inaccessible.
    error: This page doesn’t seem to exist.
    It looks like the link pointing here was faulty. Maybe try searching?

    You’ve also made me aware my blog page doesn’t work anymore. Please help me repair that if possible. Thank you.

    Hello,

    First, I have updated the password on your Bluehost account as we’re unable to view any features inside since it forces us to update it to a much more secure password. I have added the updated password in the sensitive data section.

    Also, there’s an empty folder named blog in your website’s root directory that’s why it’s showing a forbidden error on your blog page. I’ve renamed it and your blog page is already working.

    Regarding the 404 issue, it seems that you have set the category base to blog in your permalinks, that’s why it’s being used by your category pages and not your posts. I have removed it so your posts will have the structure you have preferred.

    Hope that helps.

    Thank you.

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    Hello, is anyone there?

    Could you help me out with the other part please?

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    Thank you, you are a godsend. Very helpful and wise.

    The overall structure is nearly perfect now

    Just as I wanted the posts now come up perfectly, so no problem regarding post structure.
    https://allthingsmin.com/blog/creator-academy/develop-your-branding (valid link, great structure)

    however I was wondering if it would be possible to alter this as well:
    right now if you click a particular category in the blog section of my page it does indeed include the “blog” prefix. however it also added an empty word “category”, which I don’t want:
    https://allthingsmin.com/blog/category/entertainment/
    I want to see this instead when you click on a particular category or subcategory:
    https://allthingsmin.com/blog/”fill in w chosen category/subcategory name”/
    e.g. https://allthingsmin.com/blog/entertainment/ or https://allthingsmin.com/blog/creator-academy/

    thank you.

    Hello,

    Apologies for the delay as this ticket seems to have been stuck in our drafts section for some reason.

    However, to remove the /category/ in your category URLs, I have enabled the Strip Category Base option on your WordPress dashboard > Rank Math > General Settings > Links.

    You can now check your categories updated URLs.

    Hope that helps.

    Thank you.

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    I’ve reset it back to how it was before you stripped the category. (please don’t do that again without double checking my desired link structure as it will cause me many incorrect links)
    I already tried doing that.
    However that resulted in ruining my post structure
    Desired structure for blog categories:
    https://allthingsmin.com/blog/creator-academy <-(replace w any category name)
    if you strip category, the word “blog” disappears from posts:
    https://allthingsmin.com/creator-academy
    (only category, no /BLOG/ prefix showing)
    e.g. https://allthingsmin.com/ no blog word / postname
    https://allthingsmin.com/creator-academy/engage-with-your-audience/
    (as you can see the word /BLOG/ disappeared)
    I want it to look like this instead
    https://allthingsmin.com/blog/creator-academy/engage-with-your-audience/
    (as demonstrated the word /BLOG/ prefix is there then Category name, then post name)

    Please can you help with this?
    (please double check if the link structure is correct by clicking on the categories and posts individually)

    To repeat

    I want my blog to look like this:
    https://allthingsmin.com/blog
    My blog categories to look like this:
    https://allthingsmin.com/blog/creator-academy/
    and my posts to look like this:
    https://allthingsmin.com/blog/creator-academy/engage-with-your-audience/

    please check if these three come up with these exact URL links.

    Thank you.

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    Please let me know if anything can be done to help my situation. thank you.

    Hello,

    Thank you for your patience.

    Please note that the Strip Category Base only affects the category URLs, and not your post URLs.

    Could you please confirm where are you seeing the broken links when that option is enabled? I have tried enabling it temporarily and these structures you provided are working fine:

    I want my blog to look like this:
    https://allthingsmin.com/blog
    My blog categories to look like this:
    https://allthingsmin.com/blog/creator-academy/
    and my posts to look like this:
    https://allthingsmin.com/blog/creator-academy/engage-with-your-audience/

    I have left it disabled again since you mentioned they’re affecting the post URLs.

    Looking forward to helping you.

    Thank you.

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    I doublechecked as well and this is what I found:

    I want my blog to look like this (THIS REMAINS THE SAME, WHICH IS GOOD)
    https://allthingsmin.com/blog

    My blog categories to look like thiS:
    https://allthingsmin.com/blog/creator-academy/
    (THIS CHANGES TO https://allthingsmin.com/creator-academy/ IT LOSES THE BLOG PREFIX, WHICH I’D LIKE IT TO KEEP AND I WANT ALL THE CATEGORIES TO KEEP IT SO IT LOOKS LIKE THIS: MYWEBSITE/BLOG/”CATEGORY NAME”)
    P.S. without any changes made the website URL is: https://allthingsmin.com/blog/category/creator-academy/ basically I just want the word category to disappear, but the word blog to stay

    and my posts to look like this (THIS REMAINS THE SAME, WHICH IS GOOD)
    https://allthingsmin.com/blog/creator-academy/engage-with-your-audience/

    Thnak you for your continued support.

    Hello,

    What you can do here is to directly change the category base in the permalink settings to blog. This should allow you to get the desired category page structure without turning on the Strip category base option in our plugin.

    You can change the category base in WP Dashboard > Settings > Permalinks > Optional. Please see the example screenshot below for your reference:
    Rank Math support

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    It’s not something i can’t live without but… i don’t think it should be so hard to change the post structure the way I want it…

    Is it the astra theme that’s messing things up? or what..

    I’m not sure what to do. You’re welcome to login and try to see for yourself.

    But please make sure my current post structure doesn’t change as that will cause me problems and render my links useless.

    Thank you.

    Minvydas Vegele
    Rank Math pro
    Content AI Starter

    I tried doing that, as soon as I did, all of my posts stopped working saying “it doesn’t exist”.

    so when I do that, the blog subcategories have the structure I want.
    for example: https://allthingsmin.com/blog/allthingsmin but all off my posts when you click on them stop working:
    https://allthingsmin.com/blog/allthingsmin/what-is-allthingsmin (comes up as an invalid page, this page doesn’t exist)
    before making any changes like you showed it works fine. but then my blog categories come up like this: https://allthingsmin.com/blog/category/allthingsmin.

    I don’t know why but making changes seems to crash the post pages, or change the structure in a way I don’t want.

    Hello,

    In this case, we can establish WordPress redirection by adding a code using WordPress’s wp_redirect() function.

    Please try this code:

    function redirect_category_slug() {
    	if (is_category()) {
    		$category = get_queried_object();
    		$category_slug = $category->slug;
    		$redirect_url = home_url("/blog/$category_slug");
    
    		if (home_url(rtrim($_SERVER['REQUEST_URI'], '/')) !== $redirect_url) {
    			wp_redirect($redirect_url, 301);
    			exit;
    		}
    	}
    }
    add_action('template_redirect', 'redirect_category_slug');

    You may refer to this guide on how to add filter codes to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please do not hesitate to let us know if you need my assistance with anything else.

    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 15 replies - 1 through 15 (of 17 total)

The ticket ‘/blog/tegory%/%postname%/ = broken posts’ is closed to new replies.