Support » Networking WordPress » Redirect problem with posts in subdirectory on multisite

  • Resolved wdean212

    (@wdean212)


    We are using the Sensei plugin with a multisite setup to use subdomains. Sensei, and some other plugins, use subdirectories in the URL to access their posts.
    etc. http://www.domainName.com/locationOfMultisiteInstall/wpBlogName/pluginDirectory/postName

    When I try to visit the site, I get redirected to the main domain site.
    Here is an example link.
    http://www.eyepromise.com/rewards/esp/lesson/test-lesson-1/

    Part of the URL of the site has recently changed from a name used for testing to something to use with production.
    We had this same issue before the name change but was able to resolve it my re-saving the permalink settings. I have tried resetting the permalink settings again but it did not solve the problem this time.

    Does anyone have some suggestions on how to get this to work?

    Thank you.

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

    (@ipstenu)

    Lead Plugin Wrangler

    http://www.woothemes.com/products/sensei/ ?

    If that’s the plugin, you should ask at WooThemes since they would know best.

    wdean212

    (@wdean212)

    I did ask. The plugin is not the problem. It happens with every plugin that fits the scenario. Sensei is just an example.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    Okay … so why would you go directly to the plugin folder on a site in the first place?

    http://www.domainName.com/locationOfMultisiteInstall/wpBlogName/pluginDirectory/postName

    That doesn’t make any sense. The URL should be

    http://www.domainName.com/locationOfMultisiteInstall/wpBlogName/postName

    wdean212

    (@wdean212)

    The plugin isn’t located in the directory. The plugin uses that path to group its pages.

    /lesson/postName belongs to Sensei
    /product/postName belongs to WooCommerce products

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    So they’re custom post types. Okay.

    What’s in your .htaccess?

    wdean212

    (@wdean212)

    Yeah, sorry I wasn’t very clear on that.

    .htaccess

    RewriteEngine On
    RewriteBase /rewards/
    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]

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    Name change… And you have a rewrite base of ‘rewards’ which is missing from your main domain. Is WP running from its own folder?

    I think the URL should be this: http://www.eyepromise.com/esp/lesson/test-lesson-1/

    wdean212

    (@wdean212)

    This is the URL
    http://www.eyepromise.com/rewards/esp/lesson/test-lesson-1/

    This is the location of the WP install
    http://www.eyepromise.com/rewards

    It is a multisite install using subdirectories.

    This is the URL of the site we are working on
    http://www.eyepromise.com/rewards/esp

    The “esp” directory doesn’t actually exist. WP should be resolving the URL for the multisite install, but it seems to be taking issue with extra level in the URL.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    Lead Plugin Wrangler

    The esp directory should never exist, don’t worry about that. It’s virtual stuff.

    http://www.eyepromise.com/rewards/esp/lesson/test-lesson-1/ loads for me…. What’s the problem with this? You have the custom post type of LESSON in the site ESP. This is exactly what your URL should look like.

    wdean212

    (@wdean212)

    Thanks for the input. One of our developers found the problem. There was some redirect code in a new theme that was causing the problem.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Redirect problem with posts in subdirectory on multisite’ is closed to new replies.