Permalinks Question - If Possible Without Modifying Plugin

By Steve99 - October 2, 2018

iTools Crew,

In brief, we're working on integrating a Spanish version of an English website. We already have the mechanics worked out for utilizing one file set along with Spanish version fields, and are planning on using an alias subdomain "es.domainname.com" to the main English website (which has been tested and is working fine).

The "wondering if possible" question is if there's a way to use some htaccess mod_rewrite magic that works with the permalinks plugin as-is to reference a faux subdirectory for an alternate language version such as "domainname.com/es/". In experimenting we were able to make "RewriteRule ^es/(.*) $1 [QSA,L]" work without the permalinks plugin, but just wondered if there's a method that would play nice with the permalinks plugin.

Thanks!
Steve

By daniel - October 5, 2018

Hi Steve,

Unfortunately, I don't think what you're looking to do is possible with an unmodified Permalinks plugin. The plugin makes matches by looking at the URL visible in the browser, so any "transparent" redirect (such as "RewriteRule ^es/(.*) $1 [QSA,L]") will either be ineffective or cause issues with the plugin. This sort of setup - where the fields for both languages are contained in the same record - would likely require manually adding permalink records through the Permalinks DB to handle each /es/ URL.

Let me know if you have any further questions!

Thanks,

Daniel
Technical Lead
interactivetools.com