multi language - different domains disabled in polylang

admin2025-01-07  6

Short: In Languages -> Settings -> URL modifications, the options "The language is set from the subdomain name in pretty permalinks" and "The language is set from different domains" are disabled. Why is this and how can I make these boxes selectable? I am particularly interested in the last option (different domains).

Versions: Wordpress 5.5.1, Polylang 2.8.3

Background: My goal is a bilingual website (single web site install using polylang). I have two domains domain.aa and domain.bb for the languages AA and BB, respectively. Both are pointing on my document root and the .htaccess is pointing to the wordpress directory:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.aa$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.aa$
RewriteRule ^(/)?$ wordpress/index.php [L]

RewriteCond %{HTTP_HOST} ^(www.)?domain.bb$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.bb$
RewriteRule ^(/)?$ wordpress/index.php [L]
</IfModule>

Then, I installed Polylang and there's my problem.

Short: In Languages -> Settings -> URL modifications, the options "The language is set from the subdomain name in pretty permalinks" and "The language is set from different domains" are disabled. Why is this and how can I make these boxes selectable? I am particularly interested in the last option (different domains).

Versions: Wordpress 5.5.1, Polylang 2.8.3

Background: My goal is a bilingual website (single web site install using polylang). I have two domains domain.aa and domain.bb for the languages AA and BB, respectively. Both are pointing on my document root and the .htaccess is pointing to the wordpress directory:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.aa$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.aa$
RewriteRule ^(/)?$ wordpress/index.php [L]

RewriteCond %{HTTP_HOST} ^(www.)?domain.bb$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.bb$
RewriteRule ^(/)?$ wordpress/index.php [L]
</IfModule>

Then, I installed Polylang and there's my problem.

Share Improve this question asked Oct 16, 2020 at 14:59 riddleculousriddleculous 1012 bronze badges 1
  • I'd guess those options are from Polylang, not WordPress itself, so you might do better asking them directly. – Rup Commented Oct 18, 2020 at 10:36
Add a comment  | 

1 Answer 1

Reset to default 0

You must change the Wordpress permalink settings.

Go to Settings>Permalink and chose "post name" and save then reload the Polylang settings and the options should be available.

I have not tried it with other permalink settings, but it cannot be "plain" which is the default.

It took me 2 hours to figure this out...

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736263638a906.html

最新回复(0)