multisite – How to fix redirection of Post/Page of wordpress inside the wordpress?

Question

I have WordPress inside the wordpress root. For example www.test.com (main site) then i have additional wordpress which is www.test.com/media (child). Everything is good, but except for posts and pages.

For example I created 1 post in child site, www.test.com/media/1. It’s always redirecting to 404 page of the main site, then redirected to the main site.

From what i gathered in stackoverflow, i can access the www.test.com/media because it’s a directory. I can’t access any post/page of the site for example www.test.com/media/1 .

Note. I already change my general settings and site url to www.test.com/media

here’s the htaccess of the main site (www.test.com).

RewriteRule ^media/ - [L]

<Files ~ "^.ht">
    Deny from all
</Files>

<Files wp-login.php>
    Order deny,allow
    Deny from all
    Allow from all
    #Allow from 127.0.0.1
    AuthType Basic
    AuthName "ENTER YOUR NAME & PASSWORD TO LOGIN"
    AuthUserFile /home/website/.htpasswd
    Require valid-user
    Satisfy any
</Files>

<IfModule mod_rewrite.c>
    RewriteEngine On


    RewriteBase /
    #RewriteRule Something.sso - [L]
    RewriteRule ^index.php$ - [L]
    RewriteCond %{REQUEST_URI} !.(gif|css|js|swf|jpeg|jpg|jpe|png|ico|swd|pdf|svg|eot|ttf|woff)$
    RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteCond %{REQUEST_URI} !(^/Something.sso/)
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

</IfModule>

This is my subdirectory .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase . /media/
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

0
Christian Marquez 8 months 2021-12-21T20:20:21-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse