Change Permalink Custom Structure Tab – Remove category structure tag

Home Forums BulletProof Security Pro Change Permalink Custom Structure Tab – Remove category structure tag

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #20892


    I have tried to get rid of one plugin which I have besides BPS PRO –
    I’m removing plugins which are old, not updated just to be on the safe side.

    Now what I want to achive is have no category in my URL. This would also have to work for subcategories as my site heavily depends on the categories and subcategories structure to display content. I did some Internet digging:

    and so on – many sites, many codes. The trick with no htaccess code didn’t work although I have pasted the code displayed in settings in my htaccess and followed the deployment process. The ideal thing would be not to use any plugins and just to use htaccess or any other method – one plugin less – one less possible hole in my system. Either I do something wrong or I do not get something or there is a conflict at some point with BPS rules.

    AITpro Admin

    Both of the site links above have bad/wrong information about how to correctly change/add/use correct Permalink Custom Structure Tags.  Now have you created Categories that you want to keep and just rewrite the Posts in those Categories or have you moved all Posts out of those Categories and just need to change your Custom Permalink Structure.  Please post exact examples of what you are trying to accomplish.  ie your existing URL structure.  Your existing Categories that you created.  The end result that you want to accomplish.


    You can trust no one on the web except BPS 🙂
    Here is the thing:
    – now it looks like this:
    and for subcategories:
    single post
    co there is no “category”
    The esential thing is to keep it like this as the site is build in a way that displays special views for special categories and I think that it is somehow included in the template. There are also many many links inside our website posts that point to categories and posts with URL’s like mentioned above so any changes would brake everything and with over 11.000 posts this could end up with a disaster.
    The plugin does it’s job ok – no problems since 2 years but as I mentioned – no updates and I think that it can brake any time and then we will be in deep trouble, which means that I as Editor in chief would be in the deepest trouble as we have no IT specialist and all collapses always on my head 😉
    I thought that pasting those rules in BPS custom code would do the trick but ended up with 404 errors.

    AITpro Admin

    Yep, it is always possible that WordPress will change something in a newer version of WordPress and if a plugin or theme is not updating their code to adjust to those new changes in WordPress then that plugin or theme could all of a sudden stop working correctly.

    I looked at the code in the WP No Category Base plugin and it is simply getting the internal $wp_rewrite global and get_option('category_base') option and then doing an internal rewrite/redirect with the Category Base. You can do the same thing with htaccess code.

    Personally I do not think you have anything to worry about with WordPress changing the way they do their Internal Rewriting.  It is set in stone and will probably never change.  In other words, the WP No Category Base plugin will work forever without breaking. ;)

    If you want to create the htaccess rewrite/redirect rules/code then what you will need to do is get the URL’s before they are being rewritten/redirected and then the get the final rewrite/redirect URL. After you have that information then you can create your htaccess rewrite/redirect code. See the Reference link below for examples.


    Original URL’s that are not being rewritten/redirected:

    Final rewrite/redirect URL’s:

    redirect everything in catA to the root site URL
    RedirectMatch 301 ^/catA$$1

    redirect the “old post” to the “new post” and to the new category as well.
    RedirectMatch 301 ^/old-category/my-old-post$$1


    huh… to much for my head. If you write that this plugin will just work I will leave it like it is.

    Thanks for your help – as always BPS Pro team just rocks!

    AITpro Admin

    Yep, I find it very hard to imagine that WordPress would change anything about the core foundation of URL rewriting.  It would be the same thing as replacing the engine in your car.  😉

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.