Hi @flptiffany ! This is a common problem that one can see in some public OJS instances - e.g., in https://www.sajas.co.za/index.php/ajcr/article/view/17903 the URL contains the domain name of the South African Journal of Animal Science, but the article that you open via the link is actually published in the African Journal on Conflict Resolution (sorry people for using you as an example). I’m surprised it hasn’t been paid more attention, and it’s a shame your post in this forum got overlooked, especially since, as you correctly noted, the wrong links tend to leak into the search engines. The problem is not limited to the particular OJS version.
To solve it, you have to implement some kind of URL redirects in your web server settings (I guess this is the only way) so that the server will enforce the right URLs. Judging by your post, I assume that you don’t use RESTful URLs and let’s pretend your web server is Apache (cuz I dunno anything else, duh).
In the following example, journalsdomain.tld is the main journal portal where the Journal of Common Domain is also hosted, and separatedomain.tld is where you put your Journal of Separate Domain.
Your config.inc.php then contains
base_url = "https://journalsdomain.tld"
...
base_url[jcommond] = "https://journalsdomain.tld/index.php/jcommond"
base_url[jseparated] = "https://separatedomain.tld"
where jcommond and jseparated are the OJS nicknames for the respective journals.
The .htaccess file that you should put into the OJS folder where config.inc.php is may look like
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# this redirects the requests to the main journal portal
RewriteCond %{HTTP_HOST} !journalsdomain\.tld [NC]
RewriteCond %{THE_REQUEST} /index\.php/index [NC]
RewriteRule ^index\.php/index/?(.*)$ https://journalsdomain.tld/index.php/index/$1 [NC,R=301,L]
# this redirects the requests to the Journal of Common Domain
RewriteCond %{HTTP_HOST} !journalsdomain\.tld [NC]
RewriteCond %{THE_REQUEST} /index\.php/jcommond [NC]
RewriteRule ^index\.php/jcommond/?(.*)$ https://journalsdomain.tld/index.php/jcommond/$1 [NC,R=301,L]
# this redirects the requests to the Journal of Separate Domain
RewriteCond %{HTTP_HOST} !separatedomain\.tld [NC]
RewriteCond %{THE_REQUEST} /index\.php/jseparated [NC]
RewriteRule ^index\.php/jseparated/?(.*)$ https://separatedomain.tld/index.php/jseparated/$1 [NC,R=301,L]
# with this I make some of the requests to the Journal of Separate Domain work:
# if the requested file is not found, the query is redirected
RewriteCond %{HTTP_HOST} separatedomain\.tld [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ https://separatedomain.tld/index.php/jseparated/$1 [NC,R=301,L]
</IfModule>
where RewriteConditions are like “if the hostname is not what it should be for this particular index.php/journal part of the URL, redirect the request to the right hostname”.
I quickly tested this example on my test installation and after clickity-clicking through the website and the admin/dashboard pages it didn’t give me any trouble (aside from the strange issue I mention here which, I think, is not due to the web server settings). However, I can’t say that this has been thoroughly tested, I’m no expert in Apache configs, and these rewrite rules may conflict with what you have in place (you may not even use Apache after all) so, as usual, no guarantee this will work. I hope, however, that this will give you or someone some food for thought.