• Resolved robbiet63

    (@robbiet63)


    I’m running two multisite installs and recently purchased a license for a responsive theme, Smartscreen, to integrate into both networks, but one of the two installs has an unwanted redirect that I cannot seem to fix. I am in touch with the theme developer but no solution has been found and I’m wondering if the fix might be on the WPMU side.

    WPMU#1 does not work, redirecting to admin.php: http://www.greenboard.ca/template-smart-en

    WPMU#2 works: http://merchants.greenboard.ca/template-smart-en

    WPMU#1 works with other themes like WP 2014 and Delight, but not with Smartscreen, suggesting the fix is to be found in Smartscreen. However, WPMU#1 and WPMU#2 have slightly different htaccess files, being created pre- and post-WP-v3.5, suggesting there may be a compatibility issue with the older WPMU#1 install. Or the issue could be something else.

    Fixes tried thus far include:
    (1) Wiped network cache
    (2) Disabled all network plugins, drop-ins, and plugins on blog 1.
    (3) Moved admin.php to another directory in hosting account
    (4) Reviewed Smartscreen code and commented-out/deleted mention of admin.php
    (5) Verified no redirect in hosting account
    (6) Contacted hosting provider 2x to review potential problems – their only advice is that I might need to re-install WPMU.
    (7) Attempted various modifications of htaccess without success
    (8) Went through hosting account files for WPMU#1 and removed old files that did not appear to be in use (crashed site and restored:)

    Any suggestions?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Are both installs using the most version of WordPress?

    Thread Starter robbiet63

    (@robbiet63)

    Yes, both installs are the most recent version of WP.

    The difference in htaccess appears to have been part of the evolution of WP. See “SubFolder Example WordPress 3.0 through 3.4.2” vs “WordPress 3.5+ ONLY use this if you STARTED Multisite on 3.5. If you upgraded from 3.4 to 3.5, use the old one!” http://codex.wordpress.org/Multisite_Network_Administration

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    What’s admin.php from?

    Thread Starter robbiet63

    (@robbiet63)

    Good question. My hosting provider doesn’t know and the code in the file is encrypted. They surmise admin.php originates from one of the site builders I tried when I first opened my account in 2011, before settling on WordPress. (“.rvsitebuilder” and “.fantasticodata” directories are still showing in my file manager, one level up from “public_html”.) But my host didn’t have any solutions other than suggesting I re-install the errant multisite set-up. Unfortunately none of the techs at my host have experience with multisite. It’s also not clear if a re-install of just the one multisite set-up would work, or if I might need to re-format the entire hosting account and re-install both networks plus the software that joins them. I’ll cross this bridge if I have to.

    For now I tried moving admin.php to a non-active directory. The redirect to admin.php still happens and I get a 404 error page instead of the “Site Builder” page. This suggests to me that the redirect is coming from somewhere else. Would this be a fair supposition?

    If the redirect is not in the
    (1) htaccess,
    (2) hosting account CPanel settings,
    (3) WPMU plugins,
    (4) Smartscreen theme files

    are there other places to look?

    Thanks,
    Rob

    Thread Starter robbiet63

    (@robbiet63)

    UPDATE! I found a work-around. I renamed Smartscreen’s index.php file to xindex.php and changed the functions.php reference to read require_once ('admin/xindex.php');. You can see the site load properly here: http://greenboard.ca/template-smart-en/ I will contact the Smartscreen developers to let them know. I still don’t understand why this works.

    I changed the index.php file name based on a hunch gleaned from a chat stream entitled “Solving Canonical Problems with WWW”, specifically the response by g1smd: “For URLs with the index filename mentioned in the path part of the HTTP request, use this rule to strip the filename in a redirect:…” (http://authoritylabs.com/blog/solving-canonical-problems/)

    Would this suggest I have an issue with the order of code in my htaccess as it pertains to index.php? – I would like to find a permanent solution that does not require modifying code in Smartscreen.

    Thanks,
    Rob

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Honestly I think it’s Smartscreen not being that smart.

    Why IT is redirecting, and it’s pretty clearly that, is beyond weird, and we’d need to actually study the theme code to understand why.

    The THEME shouldn’t care about canonicals.

    “For URLs with the index filename mentioned in the path part of the HTTP request, use this rule to strip the filename in a redirect:…”

    The THEME shouldnt’ be ADDING that in! WP doesn’t, after all. The .htaccess strips that.

    Thread Starter robbiet63

    (@robbiet63)

    Solved! Smartscreen (HighThemes) theme developers sent this fix:

    In functions.php, replace
    require_once ('admin/index.php'); with
    require_once (get_template_directory() . '/admin/index.php');

    And leave “index.php” as is; do not rename. Here’s the Codex for get_template_directory: http://codex.wordpress.org/Function_Reference/get_template_directory

    Thank you very much Marc and Ipstenu for taking the time to review & respond.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Unwanted theme redirect to admin.php in multisite sub-directory install’ is closed to new replies.