Jump to content

Rest API 404 Error


jmawebtech

Recommended Posts

Hi,

 

When I visit 

 

http://localhost/Integrations/prestashop_1.5.6.1/prestashop/api/customers

 

I get a 404 error. I have enabled the web service and given it full permissions. I also generated an API pass phrase. Here is my .htaccess file:

 
# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
 
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
 
 
RewriteEngine on
RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule . - [E=REWRITEBASE:/Integrations/prestashop_1.5.6.1/prestashop/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
# AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^localhost$
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>
 
#If rewrite mod isn't enabled
ErrorDocument 404 /Integrations/prestashop_1.5.6.1/prestashop/index.php?controller=404
 
 
# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
 

 

When I visit

 

http://localhost/Integrations/prestashop_1.5.6.1/prestashop/webservice/dispatcher.php

 

I get this error:

 

This page contains the following errors:
error on line 2 at column 1: Document is empty
Below is a rendering of the page up to the first error.

I am using PrestaShop 1.561. I have attached my dispatcher.php file. 

dispatcher.php

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...