Apache2+Wordpress URL gets rewritten

Hi! Perhaps someone can help me. I have two domains which both point to the same website (Debian, Apache2, Wordpress). When I put either URL in the browser's address bar, I get to the site (yay), and the URL gets rewritten in the address bar to the default (boo). The two domains are in different languages, so ideally you would get the language appropriate to the URL you used, but because it gets rewritten, I can't seem to make this work. Any hints would be appreciated! Apache config details: each URL is a separate virtual host, but both point to the same document root. Language stuff in Wordpress is managed by WPML, which would give me the option to read the URL and display the appropriate language... except it doesn't work because the URL is getting rewritten. Thank you!

William Witteman via talk wrote on 2025-06-04 16:28:
When I put either URL in the browser's address bar, I get to the site (yay), and the URL gets rewritten in the address bar to the default (boo).
The two domains are in different languages, so ideally you would get the language appropriate to the URL you used, but because it gets rewritten, I can't seem to make this work.
Any hints would be appreciated!
I didn't think this was possible, but I was wrong. https://developer.wordpress.org/advanced-administration/multisite/create-net... https://learn.wordpress.org/tutorial/introduction-to-wordpress-multisite-net... Main item from a quick read of those is:
To enable multisite, you need to edit the wp-config.php file in the root directory of your WordPress install and define the PHP constant WP_ALLOW_MULTISITE as true.
define( 'WP_ALLOW_MULTISITE', true );

Thank you for this - I appreciate it. That structure doesn't really address the problem, but we found a workaround, by directing the French-language URL to the $ENGLISH-DOMAIN/fr/, which solves the problem. Thanks again! On Wed, 4 Jun 2025 at 21:34, Ron via talk <talk@gtalug.org> wrote:
William Witteman via talk wrote on 2025-06-04 16:28:
When I put either URL in the browser's address bar, I get to the site (yay), and the URL gets rewritten in the address bar to the default (boo).
The two domains are in different languages, so ideally you would get the language appropriate to the URL you used, but because it gets rewritten, I can't seem to make this work.
Any hints would be appreciated!
I didn't think this was possible, but I was wrong.
https://developer.wordpress.org/advanced-administration/multisite/create-net...
https://learn.wordpress.org/tutorial/introduction-to-wordpress-multisite-net...
Main item from a quick read of those is:
To enable multisite, you need to edit the wp-config.php file in the root directory of your WordPress install and define the PHP constant WP_ALLOW_MULTISITE as true.
define( 'WP_ALLOW_MULTISITE', true );
--- Post to this mailing list talk@gtalug.org Unsubscribe from this mailing list https://gtalug.org/mailman/listinfo/talk
participants (2)
-
Ron
-
William Witteman