WordPress.org

Forums

[resolved] In a wordpress multisite permalinks target to main website and not to current we (5 posts)

  1. antekera
    Member
    Posted 11 months ago #

    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

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

  3. antekera
    Member
    Posted 11 months ago #

    Thanks but didn't work. Problem still persists.

  4. 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?

  5. antekera
    Member
    Posted 11 months ago #

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

Reply

You must log in to post.

About this Topic