Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I currently have a Wordpress multisite network running at http://www.mysite.com and rooted in /var/www/html. I need to set up a completely separate, single-site Wordpress installation accessible via http://www.mysite.com/intranet and rooted in /var/www/html/vhosts/intranet/html. It will use a separate database, a separate set of plugins and themes, etc.

I'm aware that this is not the best of ideas, but it's what the client wants. How can I achieve this setup?

share|improve this question
    
What have you tried? –  s_ha_dum Aug 26 '13 at 22:00
    
The best I could manage was to point http://www.mysite.com/intranet to the child site's homepage (here's the .htaccess). However, any links on it redirect to the parent site and so does http://www.mysite.com/intranet/wp-admin. –  jSepia Aug 26 '13 at 22:15
    
Ok. This is not too hard with a single site setup. I don't know how multisite might complicate it, but put your subdomain stuff first and thus avoid the multisite rules altogether. –  s_ha_dum Aug 26 '13 at 22:34
    
I must be doing something wrong here. Same result. –  jSepia Aug 27 '13 at 2:04
add comment

1 Answer

I decided to move the child installation to the main site's web root, and rename its subdirectory to intranet. Once I had done this, all I had left to do was place this line of code after the main site's rules:

RewriteRule ^intranet/ - [L]

The - rewrites the URI to itself - thus overriding any previous rules. The request is then passed on to the child site as is.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.