?
avatar shim-sao
shim-sao
12 Oct 2019

Steps to reproduce the issue

It's not an issue but a little improvement because normal link for the Api is to call the index.php (it is logical) we can easily trim the index.php like the Joomla CMS root.

Expected result

Calling Api with mod_rewrite: api/v1/rest_call

Actual result

Calling Api without mod_rewrite: api/index.php/v1/rest_call

System information (as much as possible)

Just a copy of a minimal .htaccess and web.config with /api as base to quick enable rewrite functionality. It can improve Joomla to be totally Restful compliant.

Adding a little explanation in the documentation will be helpful for beginners.

Additional comments

Keep in mind to not remove the entire /api folder or files on update or core reinstall.

avatar shim-sao shim-sao - open - 12 Oct 2019
avatar joomla-cms-bot joomla-cms-bot - labeled - 12 Oct 2019
avatar shim-sao shim-sao - change - 12 Oct 2019
Title
Improve restful Api by trimming the index.php
[4.0] Improve restful Api by trimming the index.php
avatar shim-sao shim-sao - edited - 12 Oct 2019
avatar wilsonge
wilsonge - comment - 13 Oct 2019

Yup the intention is exactly to have this. We already have the code from the php side here https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Router/ApiRouter.php#L118-L129 just need the .htaccess file to go alongside it

avatar wilsonge
wilsonge - comment - 1 Jun 2020

This was fixed in #29303

avatar wilsonge wilsonge - change - 1 Jun 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-06-01 23:10:46
Closed_By wilsonge
avatar wilsonge wilsonge - close - 1 Jun 2020

Add a Comment

Login with GitHub to post a comment