Support » Networking WordPress » theme 404.php and category.php redirect to homepage

  • I was working on a theme. I created category.php for category view and 404.php for error page. It worked on my local server.

    But in the main server it is not working. The main server use wordpress multisite and I had to enable the theme through network admin. I have also created custom single page and those works, but the category page isn’t working. It always redirect to frontpage. I also have a front-page.php in my theme. I don’t understand why this is happening as it is violating template hierarchy.

    So, it might be something related to multisite. I don’t know much about multistie. Thanks in advance for your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Is that theme active on the site?

    Do all 404 URLs redirect to the front page or only some?

    Are you using subdomains or subfolders for your sites?

    What’s in your .htaccess?

    Yes. that theme is active on the site.
    No. not all 404 urls redirect to the front page. I am giving you a general idea

    http://www.example.com/category/category-name —- redirects to front page
    http://www.example.com/category/xxxxx —- redirects to front page
    http://www.example.com/xxxxx —- redirects to front page
    http://www.example.com/xxxx/xxxx —- goes to 404 page

    I am using the main site. No subdomain or subfolder

    I am not sure about .htaccess. I guess .htaccess is not created. I don’t see one anywhere.

    Another update is the site use wpmudev

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    That isn’t what I mean. 🙂

    Are your subsites subFOLDERS? (The answer here is important, if you’re using subfolders, then the problem is you may have noblogredirect set in your wp-config)

    No. not subfolders. and NOBLOGREDIRECT is not defined in wp-config

    Off-topic:
    I was reading your site’s “about me” page and I must say wow.
    I am surprised to hear that you are not wordpress support staff. Your dedication surprise me. They should make you their #1 support stuff(no offense to others), considering the amount of support you have provided.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Hah, I work for DreamHost doing WP support now (I may have to update my site…).

    Okay, so you’re using sitename.domain.com for your subsites. Do their paths work? Like if you go to sitename.domain.com/madeupURL does that 404 correctly?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘theme 404.php and category.php redirect to homepage’ is closed to new replies.