The Administration section is unavailable when restful_urls = On [OJS 3.3.0.5]

I ask for the help of OJS community in the correct configuration config.inc.php and .htaccess for one journal for OJS 3.3.0.5. I know that this question has been discussed many times here and before asking this question, I researched a lot of topics dedicated to simplifying links in the OJS installation and I almost succeeded in everything except for two points. I almost certainly made some mistake in .htaccess, but my knowledge is not enough to fix it.
One journal is installed here. I changed the real names to just journalsite and journal. I use the following settings in config.inc.php:

base_url = "http://journalsite"
base_url[index] = http://journalsite/index
base_url[journal] = http://journalsite/
restful_urls = On

and .htaccess:

RewriteEngine On
RewriteBase /

# Bugfix for OJS 3.2.0-3: submissions API doesnt work with shortened URLs
RewriteRule ^api/v1(.*)$ index.php/journal/api/v1$1 [L,R=307]

# Rewrite URL to look cleaner
RewriteCond %{SERVER_NAME} ^journalsite
RewriteCond %{REQUEST_URI} !/journal/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/journal/$1 [L]

As a result, all sections in the backsite interface are available except for Administration section. URLs of the remaining sections is like http://journal//submissions, http://journal//manageIssues, and etc. However, the Administration section has a URL http://journal/index/admin and this logically causes the 404 Not Found error. Attempt to access via URL http://journal//admin displays the site interface but with Access denied message.
Note also the double slashes // in the some URLs. I don’t know how to get rid of them. I need help with the right setup:
a) have simplified links in URL; b) have access to the Administration section; c) remove double slashes in URLs

Hi @crosfield
Could you check that post and share the result?
Best regards,

Hi @drugurkocak
I haven’t seen this post, thank you. I tried the “cooking” recipe described there for .htaccess and it remove 2 slashes, but I can’t go to the Administration section anyway. The URL now is http://journal/index/admin but whatever 404 Not Found.
My .htaccess now:

# OJS 3.3.0.5 remove journal path

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

# Bugfix for OJS 3.2.0-3: submissions API doesnt work with shortened URLs

RewriteCond %{SERVER_NAME} ^(www\.)?journalsite

RewriteRule ^api/v1(.*)$ index.php/journal/api/v1$1 [L,R=307]

# Rewrite URL to look cleaner
RewriteCond %{SERVER_NAME} ^(www\.)?journalsite
RewriteCond %{REQUEST_URI} !/journal/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/journal/$1 [L]

RewriteRule ^api/v1(.*)$ index.php/index/api/v1$1 [L,R=307]

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

</IfModule>

Hi @crosfield
As you may know; after generating the first journal, OJS automatically hides settings and other fields in Administration section, and only “create a new journal link” remains. So, practically there is no need for the Administration section if you have a single journal. If you need to create a new journal, then the scenario becomes totally obsolete.
Regards,

Hi @drugurkocak
Hmm… There are many options left in my Administration section after creating first journal (when restful_urls is disabled):

Site Management
Hosted Journals
Site Settings
Administrative Functions
System Information
Expire User Sessions
Clear Data Caches
Clear Template Cache
Clear Scheduled Task Execution Logs

Hi @crosfield
As I explained in my related posts, these solutions are from other users, and I am thankful to them because they shared with me.
As the last sentence,
May I ask, would you need hosted journals link if you will not create a new journal?
Would you need Site settings if no Journal Site will be displayed (since you have single journal)?
None of other links are daily required functions, and might be accomplished by temporarily disabling htaccess directives. We have only one journal on our hands.

But if there are someone that is highly skilled on apache htaccess directives, I would be pleased if shares his/her solution with us.
Regards,

Hi @drugurkocak
Of course you are right and I am also grateful to you for your link, and of course the above options are not a priority for the work of the editorial team, but during debugging of the journal’s theme “Clear Data Caches” and “Clear Template Cache” options are used constantly because of the need to regenerate CSS from LESS etc. In addition, it looks strange to me that a user with admin rights does not have access to the Administrative Section in the main (that is, when the site will be used by the editors) mode of the site and to debug the UI, I will need to temporarily disable the restful_urls, will do my debug work and then enable it again. This will cause all URLs to be temporarily changed and probably only be done at night.
I still hope that there is a solution to my problem, but unfortunately I do not have enough qualifications to solve it on my own

Struggled about the same thing, but think I have found a solution.

config.inc.php:

base_url[index] = https://yourjournalsite
base_url[journal] = https://yourjournalsite

In your Apache config for yourjournalsite, this is for Apache 2.4 (I’m not allowed to use .htacess)

         <IfModule mod_rewrite.c>
                    RewriteEngine on
                    DirectorySlash on

                    # journalsite
                    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
                    RewriteRule ^/$ /index.php/journal/ [QSA,L]

                    # Redirect admin page
                    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
                    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} index/admin
                    RewriteRule ^(.*)$ /index.php/$1 [QSA,L]

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

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

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

Thanks @mpbraendle for your recipe. I don’t have access to the Apache settings on the server, but that’s not important. Your advice hasn’t worked for me yet, but you’ve given me some ideas. I’ll experiment some more, thanks!

Did anyone find a solution to this? The above rewrites do not work.

Thanks!