Support » Networking WordPress » In a wordpress multisite permalinks target to main website and not to current we

  • Resolved antekera

    (@antekera)


    I have a wordpress multisite installation with a main domain a 3 sub domains

    domain.com
    1.domain.com
    2.domain.com
    3.domain.com

    Each one with a blog, the problem is that every permalink in blog subdomains target to main site and not to the post in current subdomain.

    My link code is this:

    <a href="<?php the_permalink();?>"> My link </a>

    And my htaccess looks like this:

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    
    # END WordPress

    Any tips?

    thanks in advance

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

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Yeah that’s the wrong .htaccess

    Go to the network admin page and look at the network setup panel. Copy that .htaccess code and replace the one you have with that.

    Thanks but didn’t work. Problem still persists.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Halfelf Rogue & Plugin Review Team Rep

    Did this ever work? If not, delete and start over. You did “something” wrong, but without logging in nd poking around, it will take us a very long time to debug.

    If this did work before, what changed?

    Yes i did something wrong, many thanks for your time.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘In a wordpress multisite permalinks target to main website and not to current we’ is closed to new replies.