OJS Version: 3.3.0.13 (diciembre 26, 2022 - 08:59 )
Hello, I’m trying to configure OJS with multi-domain but I can’t configure the mod_rewrite rules correctly.
First of all, I need http to redirect to https. I have tried this for the case of “index” and “sybil”:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
RewriteCond %{HTTP_HOST} ^sybil-dev\.tirant\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://sybil-dev.tirant.com/sybil$1 [R,L]
RewriteCond %{HTTP_HOST} ^aepdiri-dev\.tirant\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://aepdiri-dev.tirant.com/$1 [R,L]
</IfModule>
In principle it redirects correctly.
Second, I need that when the URL https://sybil.tirant.com is written, it rewrites to https://sybil.tirant.com/sybil, which is where Sybil magazine is.
I have tried several rules, but without result.
What am I doing wrong?
config.inc.php:
base_url = "https://aepdiri-dev.tirant.com"
...
base_url[index] = https://aepdiri-dev.tirant.com/index
base_url[redi] = https://redi-dev.tirant.com/redi
base_url[reei] = https://reei-dev.tirant.com/reei
base_url[sybil] = https://sybil-dev.tirant.com/sybil
...
restful_urls = On
htaccess:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]
RewriteCond %{HTTP_HOST} ^sybil-dev\.tirant\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://sybil-dev.tirant.com/sybil$1 [R,L]
RewriteCond %{HTTP_HOST} ^aepdiri-dev\.tirant\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://aepdiri-dev.tirant.com/$1 [R,L]
</IfModule>