Title: Trouble with Sub-Folder Multisite
Last modified: August 30, 2016

---

# Trouble with Sub-Folder Multisite

 *  Resolved [mattkiosk](https://wordpress.org/support/users/mattkiosk/)
 * (@mattkiosk)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/trouble-with-sub-folder-multisite/)
 * I am using v3.4.4 of the plugin installed on a sub-folder multisite install of
   WP 4.3.1. The plugin is configured to Pre-Path mode and is giving me a bit of
   trouble in terms of URL setup.
 * In order for links to be as SEO-friendly as possible, the language URL segment
   needs to come right after the host in a URL. On the “root” site of the multisite,
   this is how all the links are generated, for example: [http://www.site.com/it/subfolder1](http://www.site.com/it/subfolder1).
   Clicking this link, however, throws a 404. If I hack the URL to read [http://www.site.com/subfolder1/it](http://www.site.com/subfolder1/it)
   everything loads properly and all links on that subfolder site are generated 
   correctly. But that leads me to my second issue.
 * Outside of the “root” site, all subfolder sites fail to generate URLs to their
   siblings. This appears to be the result of how the `qtranxf_complete_url_info`
   function inspects the “home” site against any URL (it doesn’t compare hosts).
   As a result, all the links at [http://www.site.com/subfolder1/it](http://www.site.com/subfolder1/it)
   to any other subfolder site do not have the language URL segment included.
 * I’ve forked the GitHub repo and start hacking on the code to resolve this issue.
   I’ve been able to get the URLs to build properly (language segment immediately
   after host, sibling subfolder links correctly including language segment), but
   the links themselves won’t load, instead throwing a 404. I suspect it’s something
   in how the plugin or WordPress is attempting to load the path. It seems like 
   it’s including the language segment as part of the request rather than ignoring
   it.
 * I’m hoping someone has had similar trouble or can point me in the right direction
   in the code so I can patch it. Any insight or guidance would be appreciated, 
   especially considering the $urlinfo/$url_info hash as I suspect the gap in my
   knowledge surrounding that is hindering me the most. In the meantime, I’ll keep
   hacking and reading the source.
 * Thanks in advance for any help!
 * [https://wordpress.org/plugins/qtranslate-x/](https://wordpress.org/plugins/qtranslate-x/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [John Clause](https://wordpress.org/support/users/johnclause/)
 * (@johnclause)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/trouble-with-sub-folder-multisite/#post-6632876)
 * What do you have in “WordPress Address (URL)” and “Site Address (URL)” on page“/
   wp-admin/options-general.php”?
 * Language code ‘/it/’ comes after whatever is in “Site Address (URL)” and .htaccess
   has to be consistent with it: [https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory](https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory).
 * I hope this may help.
 *  Thread Starter [mattkiosk](https://wordpress.org/support/users/mattkiosk/)
 * (@mattkiosk)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/trouble-with-sub-folder-multisite/#post-6633099)
 * Excellent. Thank you for the help. It does answer my question. Unfortunately,
   it seems as though my problem is a bit wonkier than I expected.
 * Great work on the plugin, too. It does an amazing job.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Trouble with Sub-Folder Multisite’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate-x_f9f9f9.svg)
 * [qTranslate X](https://wordpress.org/plugins/qtranslate-x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate-x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate-x/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate-x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate-x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate-x/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mattkiosk](https://wordpress.org/support/users/mattkiosk/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/trouble-with-sub-folder-multisite/#post-6633099)
 * Status: resolved