Errors after removing index.php

My current .htaccess looks like this:

<IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
     RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
     RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

And the error log looks like this:

[Tue Jun 27 12:09:27.678593 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d4640a0/initial] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/revista
    [Tue Jun 27 12:09:27.678834 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d4640a0/initial] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/revista -> index.php/revista
    [Tue Jun 27 12:09:27.678852 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d4640a0/initial] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/revista'
    [Tue Jun 27 12:09:27.678936 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d4640a0/initial] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/revista' -> 'index.php/index.php/revista'
    [Tue Jun 27 12:09:27.678957 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d4640a0/initial] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/revista
    [Tue Jun 27 12:09:27.678975 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d4640a0/initial] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/revista -> /index.php/index.php/revista
    [Tue Jun 27 12:09:27.678990 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d4640a0/initial] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.679134 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d467ce0/initial/redir#1] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679157 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d467ce0/initial/redir#1] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/revista -> index.php/index.php/revista
    [Tue Jun 27 12:09:27.679222 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d467ce0/initial/redir#1] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/revista'
    [Tue Jun 27 12:09:27.679268 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d467ce0/initial/redir#1] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/revista' -> 'index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.679289 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d467ce0/initial/redir#1] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679306 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d467ce0/initial/redir#1] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679320 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d467ce0/initial/redir#1] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.679425 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d43b738/initial/redir#2] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679447 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d43b738/initial/redir#2] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/revista -> index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679460 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d43b738/initial/redir#2] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.679485 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d43b738/initial/redir#2] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/index.php/revista' -> 'index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.679501 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d43b738/initial/redir#2] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679518 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d43b738/initial/redir#2] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679567 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d43b738/initial/redir#2] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.679666 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d463208/initial/redir#3] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679688 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d463208/initial/redir#3] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/revista -> index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679702 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d463208/initial/redir#3] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.679734 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d463208/initial/redir#3] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/index.php/index.php/revista' -> 'index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.679750 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d463208/initial/redir#3] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679766 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d463208/initial/redir#3] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679781 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d463208/initial/redir#3] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.679881 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d468028/initial/redir#4] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679926 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d468028/initial/redir#4] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/revista -> index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.679962 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d468028/initial/redir#4] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.679989 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d468028/initial/redir#4] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/index.php/index.php/index.php/revista' -> 'index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.680006 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d468028/initial/redir#4] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680023 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d468028/initial/redir#4] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680038 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d468028/initial/redir#4] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.680179 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d45aec8/initial/redir#5] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680209 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d45aec8/initial/redir#5] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/revista -> index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680225 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d45aec8/initial/redir#5] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.680252 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d45aec8/initial/redir#5] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/index.php/index.php/index.php/index.php/revista' -> 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.680282 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d45aec8/initial/redir#5] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680311 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d45aec8/initial/redir#5] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680327 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d45aec8/initial/redir#5] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.680425 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d46e028/initial/redir#6] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680457 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d46e028/initial/redir#6] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680475 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d46e028/initial/redir#6] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.680502 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d46e028/initial/redir#6] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista' -> 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.680518 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d46e028/initial/redir#6] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680535 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d46e028/initial/redir#6] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680669 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d46e028/initial/redir#6] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.680788 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d458278/initial/redir#7] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680810 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d458278/initial/redir#7] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680824 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d458278/initial/redir#7] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.680851 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d458278/initial/redir#7] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista' -> 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.680868 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d458278/initial/redir#7] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680894 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d458278/initial/redir#7] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.680911 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d458278/initial/redir#7] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.681008 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d457590/initial/redir#8] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.681029 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d457590/initial/redir#8] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip per-dir prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.681073 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d457590/initial/redir#8] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] applying pattern '^(.*)$' to uri 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.681115 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d457590/initial/redir#8] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] rewrite 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista' -> 'index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista'
    [Tue Jun 27 12:09:27.681133 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d457590/initial/redir#8] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add per-dir prefix: index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.681152 2017] [rewrite:trace2] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d457590/initial/redir#8] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] strip document_root prefix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista -> /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista
    [Tue Jun 27 12:09:27.681168 2017] [rewrite:trace1] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d457590/initial/redir#8] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] internal redirect with /index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista [INTERNAL REDIRECT]
    [Tue Jun 27 12:09:27.681278 2017] [rewrite:trace3] [pid 16875] mod_rewrite.c(476): [client 191.125.13.192:52458] 173.212.228.230 - - [summapsico.s4e.cl/sid#7f846c964328][rid#7f846d452c88/initial/redir#9] [perdir /var/www/vhosts/summapsico.s4e.cl/httpdocs/] add path info postfix: /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php -> /var/www/vhosts/summapsico.s4e.cl/httpdocs/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/revista

I’m not clear why the RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f is not matching this initial URI

Can you try adding:

RewriteCond %{REQUEST_URI} !/index.php/

?

This will prevent the recursion and perhaps allow you to increase the debug level to get more details of what is going on.

Another formulation of RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f which might be worth trying is RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f

I tried this:

<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
	RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_URI} !/index.php/
	RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

And i get this text in browser:
No input file specified.

Please guys
Any directions?

Sorry, this thread overlapped with my summer vacation. Are you still experiencing this problem?

Yes. I dont know what to do

El El mié, 26 de jul. de 2017 a las 09:10, Clinton Graham <
pkp@forum.pkp.sfu.ca> escribió:

Configuring mod_rewrite for specific systems is generally considered more of a webserver or system level activity than an OJS-specific activity, and you may find better resources via a forum such as Stack Exchange. I can note, however, from my own experience that I would try debugging mod_rewrite starting with simple access requests to static documents (like /docs/README) and then trying requests explicitly naming index.php, and then finally requests without index.php but mapping to index.php. Increasing the mod_rewrite LogLevel directive should provide additional debugging information.

This function is one of the more complex aspects of webserver configuration.

Hi @ctgraham,

all in all, things for mod_rewrite rules get more complicated since API calls were included in OJS 3.1.2 .

If you have standard setup like

https://myplatform.com/myjournal1
https://myplatform.com/myjournal2
.

the following rule works well (with both Apache 2.4 and 2.2):

<IfModule mod_rewrite.c>
        RewriteEngine on

        # General rule for removing index.php
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^(.*)$ index.php/$1 [QSA,L]
</IfModule>

~

However, if one has individual domains for each journal

https://myjournal1.com/
https://myjournal2.com/

things get very nasty because of the API calls, and the simple rule above given in the documentation fails.
I ask you and the PKP team to test this out and improve the documentation by providing a general instruction. That would reduce the number forum questions on this topic.

Still I haven’t found a way for such journals to display the statistics if something is entered in the filter search bar below the statistics display. It is the API call that is rerouted wrongly , because an additional / is prepended by the Rewrite engine.

Are you referring to the “api/v1/stats/publishedSubmissions” endpoint, or a different one? Can you give an example of a failed call so I can more easily replicate the problem?

I use it like this

RewriteEngine On

Redirect calls to domain root to /index path

RewriteCond %{HTTP_HOST} ^(www.)?journal.cndiovt.com.ua [NC]
RewriteRule ^/?$ https://journal.cndiovt.com.ua/index [L,R=301]

Redirect api calls

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} api/v1/
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

Redirect ordinary calls with a path

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/ovt/$1 [QSA,L]

This is an example of a rule we currently use for one of our journals:

# Journal für Psychoanalyse
RewriteCond %{SERVER_NAME} ^www.psychoanalyse-journal.ch
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/psychoanalyse
RewriteCond %{REQUEST_URI} !/index.php
RewriteRule ^(.*)$ index.php/psychoanalyse/$1 [QSA,L]

# some more rules for other journals ...

# General rule for removing index.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,L]

All calls do work with this rule, except for the following: In the admin interface, choose menu Statistics > Articles. Then enter one of the author names in the search bar below “Article Details”. The following is produced in the rewrite log:

[Wed Jun 26 11:04:18.131900 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] strip per-dir prefix: /usr/local/hope/www/ojs/api/v1/stats/publishedSubmissions -> api/v1/stats/publishedSubmissions, referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131934 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] strip per-dir prefix: /usr/local/hope/www/ojs/api/v1/stats/publishedSubmissions -> api/v1/stats/publishedSubmissions, referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131936 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] applying pattern '^(.*)$' to uri 'api/v1/stats/publishedSubmissions', referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131944 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] strip per-dir prefix: /usr/local/hope/www/ojs/api/v1/stats/publishedSubmissions -> api/v1/stats/publishedSubmissions, referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131946 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] applying pattern '^(ausgabe59)$' to uri 'api/v1/stats/publishedSubmissions', referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131949 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] strip per-dir prefix: /usr/local/hope/www/ojs/api/v1/stats/publishedSubmissions -> api/v1/stats/publishedSubmissions, referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131951 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] applying pattern '^(.*)$' to uri 'api/v1/stats/publishedSubmissions', referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131962 2019] [rewrite:trace2] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] rewrite 'api/v1/stats/publishedSubmissions' -> 'index.php/psychoanalyse/api/v1/stats/publishedSubmissions', referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131966 2019] [rewrite:trace3] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] add per-dir prefix: index.php/psychoanalyse/api/v1/stats/publishedSubmissions -> /usr/local/hope/www/ojs/index.php/psychoanalyse/api/v1/stats/publishedSubmissions, referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131972 2019] [rewrite:trace2] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] strip document_root prefix: /usr/local/hope/www/ojs/index.php/psychoanalyse/api/v1/stats/publishedSubmissions -> /index.php/psychoanalyse/api/v1/stats/publishedSubmissions, referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

[Wed Jun 26 11:04:18.131975 2019] [rewrite:trace1] [pid 16483] mod_rewrite.c(470): [client xy:64822] xy - - [www.psychoanalyse-journal.ch/sid#5635c2718708][rid#5635c2800390/initial] [perdir /usr/local/hope/www/ojs/] internal redirect with /index.php/psychoanalyse/api/v1/stats/publishedSubmissions [INTERNAL REDIRECT], referer: https://www.psychoanalyse-journal.ch/stats/publishedSubmissions

The error happens in the second last line, strip document_root prefix : The document root is stripped wrongly, so that a / remains in front of the URL.

config.inc.php: base_url[psychoanalyse] = https://www.psychoanalyse-journal.ch
Apache conf for journal: DocumentRoot “/usr/local/hope/www/ojs”
Adding a trailing / did not help.
The redirect API calls rule given by Sergey_Gimber did not help neither.

I’m not able to replicate this with the re-writes I use for my single journal 3.1.2 installs, and I don’t have a multijournal install at 3.1.2 yet, so I’ll need to build out a test case for this.

It looks like other people have the same problem, too:

I am using OJS 3.1.2-1 under Apache 2.4.6 (under OEL7) with the one of the following re-writes in effect, depending on whether OJS is directly off the root, or in an OJS folder:

$ cat /etc/httpd/conf.d/vhosts/apache-legacy-global-options.include
# If index.html precedes index.php, PATH_INFO will incorrectly list index.html in index requests
DirectoryIndex index.php index.html

# Enable URL re-writing for RESTful URLs
RewriteEngine on

# If the URI already has index.php in it, don't change it
RewriteCond %{REQUEST_URI} !/index.php/
# Skip existing directories if Apache 2.2 or later
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# Skip existing files if Apache 2.2 or later
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
# Skip existing directories if Apache prior to 2.2
RewriteCond %{REQUEST_FILENAME} !-d
# Skip existing files if Apache prior to 2.2
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite all other requests to OJS
RewriteRule ^/ojs/(.*)$ /ojs/index.php/$1 [QSA,L]

or

$ cat /etc/httpd/conf.d/vhosts/apache-global-options.include
# If index.html precedes index.php, PATH_INFO will incorrectly list index.html in index requests
DirectoryIndex index.php index.html

# Enable URL re-writing for RESTful URLs
RewriteEngine on

# If the URI already has index.php in it, don't change it
RewriteCond %{REQUEST_URI} !/index.php/
# Skip existing directories if Apache 2.2 or later
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
# Skip existing files if Apache 2.2 or later
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
# Skip existing directories if Apache prior to 2.2
RewriteCond %{REQUEST_FILENAME} !-d
# Skip existing files if Apache prior to 2.2
RewriteCond %{REQUEST_FILENAME} !-f
# Rewrite all other requests to OJS
RewriteRule ^(.*)$ /index.php/$1 [QSA,L]

I’m not able to reproduce the issue with this configuration. In my case, we keep the journal shortname as part of the URL, so that may be making the difference. I’ll try removing that.

ty @ctgraham . As far as I have learnt from posts in other forums, it depends whether the rules are included in the Apache VirtualHost configuration or in the .htaccess file.
I will try moving the rules for some journals to the Apache VirtualHost configuration and see whether that improves the situation.

I was able to reproduce this when removing the journal shortname from the URL, within an Apache virtualhost configuration.

Based on reproducing this issue in my install which masks the journal context parameter, I don’t think this can be fixed with mod_rewrite.

In my testing, mod_rewrite is appropriately handing off the request to OJS’s index.php. The PATH_INFO environment variable appears as expected, e.g. “/JOURNAL/api/v1/stats/publishedSubmissions”. PATH_TRANSLATED is wrong ("/var/www/vhost-html/ojs/index.php/JOURNAL/JOURNAL/api/v1/stats/publishedSubmissions" instead of “/var/www/vhost-html/ojs/index.php/JOURNAL/api/v1/stats/publishedSubmissions”) but I think only PATH_INFO is being used by OJS.

APIRouter receives the request from OJS, but fails at the authorization stage, ultimately executing:


This returns the 404 to the browser.

The policy assigned here:

When run with a URI of JOURNAL/api/v1/… the PKPRequest has a $requestedOperation property of “getSubmissionList”. When run with a URI of /api/v1/… the PKPRequest has no $requestedOperation property, and the whitelist check fails here:

This regexp is being used:

"~^(?|/([^/]+)/api/([^/]+)/stats/publishedSubmissions|/([^/]+)/api/([^/]+)/stats/publishedSubmissions/([^/]+))$~"

here:

src/Dispatcher/GroupCountBased.php.FastRoute\Dispatcher\GroupCountBased->dispatchVariableRoute:19	
src/Dispatcher/RegexBasedAbstract.php.FastRoute\Dispatcher\GroupCountBased->dispatch:29	
Slim/Router.php.Slim\Router->dispatch:204	
Slim/App.php.Slim\App->dispatchRouterAndPrepareRoute:586	
Slim/App.php.Slim\App->process:402	
Slim/App.php.Slim\App->run:315	
classes/core/APIRouter.inc.php.APIRouter->route:109	
classes/core/Dispatcher.inc.php.Dispatcher->dispatch:134	
classes/core/PKPApplication.inc.php.Application->execute:252	
index.php.{main}:68	

This is requiring a ? or /something in front of the /api/ for the route to match.

So, I think this all comes down to:


which requires a context path as part of the endpoint pattern.

Blockquote Based on reproducing this issue in my install which masks the journal context parameter, I don’t think this can be fixed with mod_rewrite.

@ctgraham Now what? You can’t require from a OJS site that all journals domains be added by the contextPath, because the domain is essential for a journal’s branding.

There’s no way that a journal like https://sui-generis.ch would accept https://sui-generis.ch/suigeneris as part of its URLs.

So there MUST a solution be found in the PHP code to allow API routes without having to have contextPath. A configuration such as base_url[suigeneris] = https://sui-generis.ch in config.inc.php is already providing context and is allowed.

I think this is scheduled to be fixed in 3.2:

1 Like

Great to hear so. Looking forward for OJS 3.2!