• After setting up my multisite, my pretty links setup was undone. So I set it back to settings > permalinks > custom structure https://onceuponajrny.com /%category%/%postname%/

    I had previously set category base to ‘.’ so the ‘category’ is excluded from URLs, but when I made the same change, I got 404 errors on some category pages (links are still working WITH ‘category’ in the URL) and some category pages were redirected to blog posts. I now put the ‘category’ back in my URLs as a temporary solution (otherwise my entire menu doesn’t function properly), but I would love to hear how to exclude ‘category’ from a multisite.

    Example: https://onceuponajrny.com/destinations/asia/ = 404 error, but https://onceuponajrny.com/category/destinations/asia/ works (even when excluded ‘category’ in category base)

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Thread Starter onceuponajrny

    (@onceuponajrny)

    I suspect the changes were made by the rules I added in wp-config.php and .htaccess file when I setup my multisite. I’d love to hear if there is a rule that I can change that will fix this.

    define(‘MULTISITE’, true);
    define(‘SUBDOMAIN_INSTALL’, false);
    define(‘DOMAIN_CURRENT_SITE’, ‘onceuponajrny.com’);
    define(‘PATH_CURRENT_SITE’, ‘/’);
    define(‘SITE_ID_CURRENT_SITE’, 1);
    define(‘BLOG_ID_CURRENT_SITE’, 1);

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]

    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ – [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

Viewing 1 replies (of 1 total)
  • The topic ‘Multisite ‘category’ exclude url 404’ is closed to new replies.