[resolved] Redirect problem with posts in subdirectory on multisite (11 posts)

  1. wdean212
    Posted 2 years ago #

    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.

    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.

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

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

  3. wdean212
    Posted 2 years ago #

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

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


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


  5. wdean212
    Posted 2 years ago #

    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

  6. So they're custom post types. Okay.

    What's in your .htaccess?

  7. wdean212
    Posted 2 years ago #

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


    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]
  8. 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/

  9. wdean212
    Posted 2 years ago #

    This is the URL

    This is the location of the WP install

    It is a multisite install using subdirectories.

    This is the URL of the site we are working on

    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.

  10. 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.

  11. wdean212
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic