Can my store resolves API request using custom admin url? Eg: https://admin.magento.lc/api/v2_soap?wsdl=1? Here problem is if I use api url via custom admin url it redirects to frontend.

  • Interesting, never tried it with a custom admin subdomain. Did you already solve it? – Anna Völkl Jan 4 '15 at 14:05
  • not, @AnnaVölkl, it is pending – mageUz Jan 5 '15 at 7:20
  • @mageUz Did you manage to solve this issue? – Rinto George Oct 28 '15 at 6:47
  • @duke not solved, see answer given below. api is frontend route, so it is not possible working with api via admin url – mageUz Oct 28 '15 at 8:34

After having a look into /app/code/core/Mage/Api/etc/config.xml i saw, that the route is only configured for the frontend, not for admin:

<modules ...>
<global ...>

So there is no admin-route for /api which might be the cause why you get redirected. I did not test it though.

| improve this answer | |

First solution is to deactivate the 301 or 302 redirect from System > Web > Url Options > Auto-redirect to Base URL

Then try again without custom admin url : http://magento.dev/api/v2_soap/index/wsdl/1/

This may cause some issues loosing http://example.com/store/ to http://www.example.com/store/ redirections...

Second solution is to set a rewrite rule on the web server config (here Apache vhost) :

RewriteCond %{HTTP_HOST} ^admin\.magento\.biz$ [NC]
RewriteCond %{REQUEST_URI} /api/
RewriteRule ^ https://magento.biz%{REQUEST_URI} [L,R]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.