• Hello!
    Currently we have a multi language site running in .NET on IIS.
    As well, we have a blog, in 3 languages, which runs on NGINX.

    This is the URL structure we currently have:
    www.sitename.com/path/to/page/ – for default language
    www.sitename.com/lang/path/to/page/ – for other languagaes

    The same structure is applicable to the blog installations:
    www.sitename.com/blog/ – for default language
    www.sitename.com/lang/blog/ – for other languagaes

    So, we have IIS for the site and NGINX for the blog. The rewrite rules are set up in the IIS web.config and point to some subdomains which are linked to 3 separate installations of wordpress (one installation for each language), like blogLang1.sitename.com, blogLang2.sitename.com and blogLang3.sitename.com.

    Now I’m trying to unify these installations and keep the same URL structure. The default suggested URL structure for the sites in the WordPress Network is sitename.com/blog/ and correspodingly sitename.com/blog/lang1 and sitename.com/blog/lang2

    After this initial setup it is possible to open each site configuration from the Network Administration and change the URL to sitename.com/lang1/blog/ where the language prefix would go before “/blog”. Alright, looks good, but when I open the site on this path, I get a 404 Not Found (of course, I don’t have the /root/en/blog folder, just the /root/blog.

    So my idea in this case is to utilize the .htaccess file in the root to catch the language parameter in and somehow pass it to the index.php file to load the correct site and pages correspondingly. (Yes, I know, .htaccess is for Apache, which I use in my local environment, not NGINX which I was talking about, but the server configuration is adjustable later)

    So, my questions would be the following:

    1. How can I configure my .htaccess to pass the language parameter with this untypical URL structure to the ^index\.php$ pattern?
    2. What would be your ideas of replacing the technical subdomains for different installations, which are moving into a single installation? I guess, just leave only one subdomain, and then fitler requests using solution from #1

    Thank you guys!

Viewing 2 replies - 1 through 2 (of 2 total)
  • What you are looking for is an expert with Apache Rewriting URLs? I am only a novice, this should be close to what you are looking for:

    RewriteCond %{REQUEST_URI} ^/blogs/([_0-9a-zA-Z-]+/)
    RewriteRule ^blogs/([_0-9a-zA-Z-]+/)(.*)$  $1blogs/$2   [L]
    Thread Starter yo1lka

    (@yo1lka)

    jkhongusc, could you explain the rule you have written please?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘URL structure problem of Multilanguage site on IIS Multilanguage blog on NGINX’ is closed to new replies.