Hi @klausru,
Thanks for the details! I’m sure a lot of folks will find this helpful.
Regarding the 400 Bad Request problem, this might simply be missing entries in the allowed_hosts setting in config.inc.php.
Regards,
Alec Smecher
Public Knowledge Project Team
klausru
62
Dear @asmecher
thanks for the hint. I’ve added the www-parts to config.inc.php
; Base URL override settings: [...]
base_url[index] = https://ojs.oapublishing.ch
base_url[journt] = https://www.journaltest.ch
base_url[testz] = https://www.testzeitschrift.ch
[...]
allowed_hosts = "[\"ojs.oapublishing.ch\", \"www.ojs.oapublishing.ch\", \"journaltest.ch\", \"testzeitschrift.ch\", \"www.journaltest.ch\", \"www.testzeitschrift.ch\"]"
Additionally, I included the www in the rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On
#first block
# second block
RewriteRule ^api/v1(.*)$ index.php/index/api/v1$1 [L,R=307]
RewriteRule ^api/v1(.*)$ index.php/testz/api/v1$1 [L,R=307]
RewriteRule ^api/v1(.*)$ index.php/journt/api/v1$1 [L,R=307]
#third block
RewriteCond %{SERVER_NAME} ^(www\.)?testzeitschrift\.ch$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/testz/$1 [QSA,L]
RewriteCond %{SERVER_NAME} ^(www\.)?journaltest\.ch$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/journt/$1 [QSA,L]
RewriteCond %{SERVER_NAME} ^(www\.)?ojs.oapublishing\.ch
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php/index/$1 [QSA,L]
</IfModule>
Now things are running smoothly and I can call the domains either with or without www .
asmecher
Closed
63
This topic was automatically closed after 12 days. New replies are no longer allowed.