• Hi,

    I think my query falls in this category, thats why I’m posting it here.

    We’ve a small multisite installation at wwd.com, in there, there are two sites. (both are not live just, for testing purpose).
    ie. wwd.com (root) and wwd.com/site1/ (child)

    Now the main thing is here. I wanted a staging site or development site (WP) on another folder in the root, not related to multisite.

    Successfully installed it. Now its in root, inside a folder ‘test’. It is accessed via wwd.com/test/.

    Here it becomes serious, whenever (on most occasions) I save a post or page, instead of returning to that edit post/page page, I’ve been redirected to wwd.com (front-end).

    I’m really fed up with it now.

    What I’m doing is reloading the edit post/page in a new tab and saving. ‘Sometimes’ it returns to same edit post/page page and ‘Sometimes’ it goes to wwd.com.. I still can’t figure out about the ‘Sometimes’…

    What may be reason?
    And an important work is going on /test (delivery is due actually)

    I think its related to .htaccess, but couldn’t find on internet what to add/remove..(whether its related to multisite’s .htaccess or /test’s .htaccess)

    One more thing, it happens to the front-end too. Accessing wwd.com/test/page1 goes to wwd.com.

    Thanks in advance.
    (Hope my question is clear..)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The reason is as you suspect. The .htaccess file in your root that should be for your multisite is interferring with your WP test site.

    IMO, that is not a good setup. You are having problems now. Even if you fix this particular problem, I almost guarantee more problems in the future.

    I recommend a different test setup. For example maybe another site called wwd-test.com

    If you show me your .htaccess I might be able to help you. The multisite .htaccess that resides in your root.

    Thread Starter Anil Martin

    (@anilmartinvj)

    First of all, thanks for that quick reply.

    Sorry, I can’t go for another site, now my tasks are 80% done. I should’ve came here much earlier.. Why I came now? Because I doubt, I will delay the delivery further, because of this scenario. IF I can get rid of this situation, I can concentrate on my tasks..

    Here is my doubt. Can’t we have a standalone, where there is a multisite installed in root?

    Here is the .htaccess from my root.

    <IfModule mod_rewrite.c>
    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]
    
    </IfModule>

    And here is the .htaccess from my /test ( in case you want to see it too, may be here is the problem..because I’d modified/edited/added it based on some results I found on net..:/ )

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /test/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /test/index.php [L]
    </IfModule>
    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>
    # END WordPress

    Thanks again.

    This is the first thing I would do before modifying the root .htaccess:
    1) back it up
    2) remove it temporarily
    3) access your WP test instance and see if you can edit a page. Also see if you can access page/posts

    If step #3 works, then you should try modifying your .htaccess. I think this will work (but not certain). Notice that I added one line:

    <IfModule mod_rewrite.c>
    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]
    
    # this is path to your test site
    RewriteCond %{REQUEST_URI} !^/test/.*$
    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>
    Thread Starter Anil Martin

    (@anilmartinvj)

    Hi.

    Please mark this as closed.
    Before I could work out the above logic, client closed the project.
    I don’t have/own any other place to check it out.
    ??
    Was frustrated and sad. Did look into the forum after that.

    Thank again for all the effort taken.
    ??
    A BIG THANKS. Good Day.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Redirecting to multsite root?!’ is closed to new replies.