WordPress.org

Ready to get started?Download WordPress

Forums

Category base of "/" (6 posts)

  1. chuyskywalker
    Member
    Posted 9 years ago #

    I see that categories can be accessed like:

    site.com/CAT_NAME

    since the htaccess reads:

    RewriteRule ^(.+)/?$ /index.php?category_name=$1 [QSA,L]

    However, if I try to set the permalink structure for Category Base to a value of "/", it does not update my structure for the links that become generated in the "Posted in" list.

    How can this be resolved, or was it left this way for a reason?

  2. TechGnome
    Moderator
    Posted 9 years ago #

    It's this way so that WP knows it's dealing with an actual category, rather than an actual directory on your site. Example, I have a downloads folder in my site's root. If I were to also have a category called "Downloads" I need to be able to distinguish between the downloads folder site_root/downloads and the the download category site_root/category/downloads

    So, when you set it to "" or "/" it assumes the default setting of "category"

    Tg

  3. chuyskywalker
    Member
    Posted 9 years ago #

    I figured as much. Will I have to hack this in to get it to work the way I want?

    (Keeping an eye on category names vs. real folders is something I can handle)

  4. hamish
    Member
    Posted 8 years ago #

    Hi there. Did you ever manage to get your base category set to "/"? I too can safely manage my root folders and would love to get this re-write working like you mention above.

    Cheers!

  5. ceo
    Member
    Posted 8 years ago #

    It's not only real folders this structure can mess with. If you have pages - and a category of the same name, you've basically given your blog a world of brokenness. Just thought I'd mention that.

  6. hamish
    Member
    Posted 8 years ago #

    Yes good point - but I still maintain that I have a good enough hold on my site architecture that this will not be a problem. :-)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.