Hi, I’ve been using OJS for quite long now and I was wondering if it is possible to generate friendly urls for the articles in each journal. right now the structure is as it follows:
I’m managing a site with half a dozen journals in three different languages, and it’s important to the client to have clean urls for SEO reasons.
If it’s not possible, does it has a technical or editorial explanation?
My OJS version is 3.1.0.1
I already setup the rewrite conditions in .htaccess to hide index/index.php from the address
The RESTful URLs setting in config.inc.php in combination with the rewrite rules in .htaccess (or similar) will remove the “index.php” component of the filename and generate what we refer to as “clean urls”.
It sounds like you are looking for something beyond that?
If you are wanting to mask the SITE component and give each journal its own domain name, that is possible with the base_url[] settings in config.inc.php and with additional webserver configuration.
If you are wanting to mask the /article/view/ component that would be possible in a webserver re-write, but not recommended as this forms a part of the RESTful URL.
To do this, you would start with the “public url identifier” (Metadata → Identifiers). Set this to be the human readable string you want. This will change the URL’s “id” to your string (without getting rid of the “view” or “download”). If this is acceptable, you are done.
If you want to remove the “view” component, you will need to add a rewrite which maps anything of the pattern /article/(.+) which is not /article/view/ or /article/download/ to /article/view/$1.