marc
July 25, 2023, 9:04am
2
Hi @hbjaili ,
Please see check first in forum post here where options are referred to for using mod_rewrite
like:
Once configured, I you still have trouble reaching the /api resources, be sure you don’t miss the 307 redirections rules as Antii-Jussi proposed here:
opened 05:14PM - 12 Jul 19 UTC
closed 08:51PM - 22 Oct 19 UTC
**Describe the bug**
See: https://forum.pkp.sfu.ca/t/errors-after-removing-inde… x-php/31314
and: https://forum.pkp.sfu.ca/t/ojs-3-1-2-1-journal-statistic/54224/4
**To Reproduce**
Steps to reproduce the behavior:
1. Add a context specific base url which masks the context shortname, e.g.: `base_url[journal] = https://my.journal.com`
2. Navigate to the Article Statistics (Dashboard -> Statistics -> Articles)
3. Enter some text in the Article Details search
4. Result will be 404s from the application API calls
**What application are you using?**
OJS 3.1.2
**Additional information**
Core problem appears to be here:
https://github.com/pkp/pkp-lib/blob/27eeff555bdcfa6da9f787d259184b1cfacff025/classes/handler/APIHandler.inc.php#L174
This pattern requires the URL to contain the context key.
My trace through the code to find this is documented here:
https://forum.pkp.sfu.ca/t/errors-after-removing-index-php/31314/33?u=ctgraham
If that doesn’t relate to your particular use case (which we find is most commonly people wanting to change standard URL), then please reply elaborating on what you are trying to do.
Cheers,
m.