• EG: /%post_id% as a rewrite rule gives me /categories/catname as url for categories. Is there a way to get rid of this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I think wp does this to avoid having conflicting rewrite rules in the .htaccess files.

    I would like to have /%postname%/ as my rewrite rule in preferences
    Now imagine I make a category cats and then I choose cats as a post title

    What does https://www.mywebsite.com/cats/ mean? The category cats or my post cats?

    even though your example would pretty much avoid that problem unless you have a category named as a plain number

    If anyone has a solution, i’d be interested too.

    dissursion,

    Go into your Options > Permalinks section of your admin panel and regenerate them without /category as the optional custom prefix.

    Thread Starter dissurion

    (@dissurion)

    Tnx for the answers.

    I’ve set my permalink structure as /%post_id%/. There’s nothing in the optional prefix box, so that leaves me with default. And default seems to be /category. Just giving / does nothing.

    ps: following 2 days without computer, so I’ll check back then

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘how to avoid /category/ in rewritten url (mod rewrite)?’ is closed to new replies.