• Resolved marcAroma

    (@marcaroma)


    I just setup a fresh WordPress multisite using Sub-directories

    It all seems fine, I can browse the Admin section and can see the live site (which has no pages, posts or comments at the moment…)

    I then go in the Admin section to “Sites” > “All Sites” from the left hand navigation.

    And when I click there on Sites “Add New” I get a broken link because the link is missing the main sub-directory (https://sub-domain.domain.com/wp-admin/network/site-new.php)

    However, if I try to add a site from “Sites” > “Add New” from the left hand navigation it works (https://sub-domain.domain.com/sub-directory/wp-admin/network/site-new.php)

    But it brakes again here once I press submit since the form seems to miss the sub-directory again (https://sub-domain.domain.com/wp-admin/network/site-new.php?action=add-site)

    The same problem of the missing sub-directory in the root is also when I try to click on any link form the TOP admin Navigation:
    “My Sites” > “Network Admin” > “Dashboard” or
    “My Sites” > “Network Admin” > “Sites” or
    “My Sites” > “Network Admin” > “Users” or
    “My Sites” > “Network Admin” > “Themes” or
    “My Sites” > “Network Admin” > “Plugins”

    Any idea what is causing this inconsistency in regards of the sub-directory

    I am using the same .htaccess in the sub-domain and in the sub-directory:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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).*) subdomain/subdirectory/$2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ subdomain/subdirectory/$2 [L]
    RewriteRule . index.php [L]
    </IfModule>
    # END WordPress

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter marcAroma

    (@marcaroma)

    I now removed the the second unused .htaccess in the sub-directory and replaced the .htaccess in the sub-domain dir with the suggested rules from https://codex.www.ads-software.com/htaccess with the rules below…

    But still no luck…

    Anyone has got an idea what is going wrong?

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    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]
    </IfModule>

    # END WordPress

    Thread Starter marcAroma

    (@marcaroma)

    OK, silly me, I removed the sub-domain, mada a clean install and it all works fine now ??

    jonnylons

    (@jonnylons)

    How did you do a clean install?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WordPress multisite – Sub-directory not working in Admin’ is closed to new replies.