Problems with wordpress redirects of a site inside a site

I’ve been digging through all sorts of tutorials on this and messing with a bunch of multisite/htaccess stuff. Let me give you my scenario and see if someone can tell me what in the world to do to make it work.

I have a wordpress site in a folder
/mudmin6
That site is mudministry.org

Read More

I have another wordpress site (totally separate) in a subfolder of that site
/mudmin6/userspice
That site is userspice.com

Ideally I would like to be able to access this site by typing either of these two things…

mudministry.org/userspice
or
userspice.com

So far, that works. However, I can’t do something that’s really important.

I can’t type, say
userspice.com/forums and get to my forums. I get an internal server error. The only way to get to the forums is to go all the way back to mudministry.org/userspice/forums

Can someone tell me what needs to change in my .htacces, wp-config, or wordpress dashboard to make this happen (and in what subfolder to make these changes?)

.htaccess for mudministry.org

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

# END WordPress

<Files 403.shtml>
order allow,deny
allow from all
</Files>

.htaccess for userspice

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

# END WordPress

I know that there are a lot of people who will say why do I need to do this? I need to do it for a grant we have. The initial domain must be accessible by mudministry.org/userspice but it’s also really annoying that I can’t type userspice.com/anything and get to any of my pages.

Related posts

1 comment

  1. Perhaps you can use the internal Proxy [P], I have not done this before, but let me know if this works.

    You will want to put this into the root .htaccess

    RewriteRule ^(userspice)/(.*)$ http://userspice.com/$2 [NC,P]
    

    You may also want to use ProxyPassReverse to make sure any redirects are done as you expect. This may not work, depending on how you have relative and absolute urls used in your application. But if you dont mind that when the user starts to browse around in the userspice directory, that they are switched over to the userspice.com domain, this could work

Comments are closed.