Single journal url .htaccess configuration

Sorry, I think it will appear for all. I manage single journal.

Thanks

I wish that one single easy option could MASK the long OJS URL to a short custom version. Such as

http://mydomain.com/index.php/MyJournal

http://mydomain.com/MyJournal

and if one journal to

http://mydomain.com/

Is there any new release of OJS on the way please? I thought the issue with Static page menu item will be addressed in new release, am I right?

I have the same situation. My single journal is on the subdomain http://journal.domain.com Now setup in config.inc.php:

base_url[index] = http://journal.domain.com
base_url[journal] = http://journal.domain.com/journal
restful_urls = On

and .htaccess file:

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

Now the site opens with http://journal.domain.com/journal. How to remove the trailing /journal? That is, that the site opened by URL http://journal.domain.com

Dear @ctgraham
I would like to continue on this as I was upgrading from 3.1.2.4 → 3.2.1.2 an encountered the issue of redirecting API calls . I just want this single journal on the site with pretty URLs without having to fiddle with .htaccess except for enabling RESTful URLs.
So I inspected the code for the $site->getRedirect() and related.

First: I could not quite find out what the setting in the db actually does.
Second: As I understood the redirect setting should be in https://github.com/pkp/pkp-lib/blob/master/templates/admin/contextSettings.tpl , but there is not even code for it. Is it really missing?

Maybe @NateWr and @asmecher could clarify what redirect :: true/false actually does and how to get there.

Thanks for your help and all the best
Klaus

Hi, @klausru.

Can you describe the problem you are seeing with redirecting API calls in 3.2.1-2? The issue #4919 is believed resolved as of 3.2.x.

In older versions of OJS, you could set a redirect at the site level to a specific context (journal). In 3.2, I think this is automatic in the case of a single journal installation.

Can you clarify what code you are looking at with respect to redirect :: true/false?

Dear @ctgraham

the issue is as here: SOLVED: Upgrade from OJS 3.1.2.4 to OJS 3.2.1.2: problems with url api in back-office
or here: [OJS 3.2.0.3] Error on Submission Page - #22 by drugurkocak

base_url = "https://www.medienpaed.com"
base_url[medienpaed] = https://www.medienpaed.com
restful_urls = On

I pretty much tried all of those .htaccess rewrite rules but none really work. They either 404 or 500 for the whole site or they don’t properly affect the API calls. My current .htaccess is (from: [Solved] Problems with api submissions error on submissions page - #10 by ctgraham):

# If the URI already has index.php in it, don't change it
RewriteCond %{REQUEST_URI} !/index.php/
RewriteCond %{REQUEST_URI} !/medienpaed/
# 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
# Rewrite all other requests to a specific journal in OJS
RewriteRule ^(.*)$ index.php/medienpaed/$1 [QSA,L]

# If the URI already has index.php in it, don't change it
RewriteCond %{REQUEST_URI} !/index.php/
RewriteCond %{REQUEST_URI} /medienpaed/
# 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
# Rewrite all other requests to a specific journal in OJS
RewriteRule ^medienpaed(.*)$ index.php/medienpaed/$1 [QSA,L]

Too bad that this code only removes the error message and puts the API request in some loop, without any effect (bonkers?). Thus I can’t use filters on submissions etc.
As earlier posts mentioned that redirect in site table should make redirecting single journal instances very easy, I started to try to figure out what this actually does. Its value used to be set to "1". A fresh install sets or leaves the value on “0”. But changing the value has no effect.

Any idea?

Solved with this solution: [OJS 3.2.0.3] Error on Submission Page - #24 by KBodarwe

I don’t know why it did not work before, but for now it’s fine.