Here's a summary of my scenario:

  • I'm running Wordpress on a linux environment
  • The root directory contains and index.php file that references the subdirectory where my main site's files are (codex link). Let's say this site is example.com
  • Example.com works fine and pulls up the content that I have stored in my subfolder /foo
  • I have another Wordpress site that I've set up, and I'd like it to be accessible at example.com/bar
  • Visiting example.com/bar redirects me to the canonical URL e.g. example.com/barhopping-is-fun

No matter what I do, I can't seem to get example.com/bar to load my other Wordpress site.

Here's what I've done so far.

  • Checked to make sure there is no wp_terms slug for bar
  • Removed any non-standard .htaccess content from both the /foo and root directories.
  • Modified the .htaccess in /bar to contain this (which results in an internal server error)
    • RewriteBase /bar/
    • RewriteRule . /bar/index.php [L]

Followed this guide, which resulted in the error. Any thoughts on how to fix this?

Edit: noticed that this Wordpress environment doesn't ever go to a 404 page. If it's a URL that is similar to a slug that exists it redirects to that slug. If it's a totally unknown URL it redirects to home. However there are no rules for this in .htaccess nor are there any redirect plugins running.

  • If you're setting the RewriteBase to /bar/ then your first RewriteRule should just be RewriteRule ^index\.php$ – [L]... That's probably why you're getting a server error May 31, 2016 at 21:33
  • Thanks that resolved the error however the /bar is still redirecting to example.com/barhopping-is-fun, the wordpress in the subdirectory is just not getting picked up.
    – Orun
    May 31, 2016 at 21:41
  • 1
    You need to exclude /bar from the rewrite rules in the .htaccess for your top-level WordPress site. Jun 1, 2016 at 10:39


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.