WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Trailing slash needed to find subdirectory (16 posts)

  1. Burke Ingraffia
    Member
    Posted 3 years ago #

    I have a subdirectory multisite set up.

    When I want to get to http://www.sitename.com/word/

    I should be able to get there by typing into the address bar:

    sitename.com/word

    but what I am redirected to is

    http://www.sitename.com/word-used-in-main-site-post-title/

    how do I fix this? Can I add a trailing slash with .htaccess? If so how?

  2. What's in your .htaccess for WordPress?

  3. Burke Ingraffia
    Member
    Posted 3 years ago #

    Lots of redirects. I am using wp total cache too.

    Here is the standard stuff I have:

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

    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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]

    There are some other rewrites, but I am pretty sure they are not making this happen

  4. I hate to suggest it, but turn of total cache for a test?

    I can't repro that on a fresh install.

  5. Burke Ingraffia
    Member
    Posted 3 years ago #

    It is indeed an issue with wp total cache. All I had to do was deactivate it from the main site and

    sitename.com/word

    took me to the sub site

    http://www.sitename.com/word/

    as desired

    WP total cache was left active on the sub sites.

  6. I've never used that plugin, but I'm pretty sure that these cache plugins need to be per-site activated, and not network...

  7. Burke Ingraffia
    Member
    Posted 3 years ago #

    I did a complete reinstall of wp total cache and determined that it was the "Object Cache" function. When I disabled it I no longer had this issue.

  8. bazonline
    Member
    Posted 3 years ago #

    this was driving me nuts, thanks Ipstenu, your Half-Elf advice worked!!

  9. I'm pretty sure that these cache plugins need to be per-site activated, and not network...

    Super cache is network activated when running a network.

    The issue with caching plugins (and plugins in general) is if they are written in such a way as to completely ignore multisite, then you get un predictable results.

  10. Walid
    Member
    Posted 3 years ago #

    Hello, I want to know if this problem was solved or not, I mean if W3 Total Cache considered to fix it, cause yesterday I had this problem and that's how I reached this topic. any fix except disabling object cache?

  11. Did you network activate or per-site activate?

  12. Walid
    Member
    Posted 3 years ago #

    @Ipstenu
    actually, there is no network-activation option in w3 total cache, it gives error message if you clicked network activate, just main blog activation is possible, and that's what I did. and still the trailing slash problem is present.

  13. Just checking. You used to be able to and it screwed people up.

    In your wp-config.php, what do you have for define( 'PATH_CURRENT_SITE', '/' ); ?

  14. Walid
    Member
    Posted 3 years ago #

    @Ipstenu
    Its the same as you copied:
    define( 'PATH_CURRENT_SITE', '/' );

  15. Walid
    Member
    Posted 3 years ago #

    btw, i just noticed something strange, it works well sometime, and other time it doesn't work, I think this is somehow related to cache date or something.

  16. btw, i just noticed something strange, it works well sometime, and other time it doesn't work, I think this is somehow related to cache date or something.

    That is ... weird. You may have installed the caching tool wrong, I have to say. You shouldn't be getting a sometimes error like that with a correct set up, it should either always fail or never.

    Do me a favor, make a NEW topic and tag it with whatever cache tool you're using. The guys from w3tc and wpsc are usually pretty on the ball for that.

Topic Closed

This topic has been closed to new replies.

About this Topic