How to change the "/issue/archive" url path?

Hi,

I’m trying to change de http://domain/issue/archive to http://domain/issue/all
How can I make this change in OJS?

Regards,
Geucimar

If you are thinking about a plugin (supposing you are talking about OJS 3+), you can call Request object from plugin that extends GenericPlugin class. You can view the code in any OJS plugin. And, for example, if requsted page is all (or URL contains…) display certain Smarty template. It is done by the methods of that class. Don’t forget to change all links to you custom page where neccessary at the front-end.

Hi Vitaliy, are there a manual way to do this without plugin?

I’ve found this solution:

base_url = “http://localhost
base_url[index] = http://localhost
base_url[journal] = http://localhost
restful_urls = On

<IfModule mod_rewrite.c>

# enable rewrites
RewriteEngine On

# redirect everthing ^$ to http://localhost/home
# then point home to http://localhost/index
RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule ^$ http://localhost/home [NC,L,R=301]
RewriteRule ^home$ http://localhost/index [NC,L]
# output: http://localhost/home

# input: http://localhost/issue/archive
# change /issue/archive to /issue/all
# then point /issue/all to /issue/archive
RewriteCond %{THE_REQUEST} /issue/archive [NC]
RewriteRule ^issue/archive$ /issue/all [R=301,L,NC]
RewriteRule ^issue/all$ /issue/archive [NC,L]
# output: http://localhost/issue/all

# select all composed %{DOCUMENT_ROOT}%{REQUEST_URI}
# ^(.)$ to $1 and redirect to /index.php/journal/$1
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.
)$ /index.php/journal/$1 [NC,L]

</IfModule>

Thank you!

1 Like