고객의 XML 목록을 얻기 위해 간단한 웹 서비스를 실행하려고하지만 http://www.myshopurl.com/api/customers이되면 PS가 FrontPage로 리디렉션합니다.Prestashop 웹 서비스 API 리디렉션
Mod_rewrite가 아파치에서 켜져 있습니다 (phpinfo 함수로 확인). 그 htaccess로 잘 형성된다 생각 : PrestaShop 버전 1.6.0.14 및 PHP 버전 5.5.9-1ubuntu4.19를 사용
# ~~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
# http://www.prestashop.com - http://www.prestashop.com/forums
<IfModule mod_rewrite.c>
<IfModule mod_env.c>
SetEnv HTTP_MOD_REWRITE On
</IfModule>
RewriteEngine on
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#Domain: www.mydomain.com
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api$ api/ [L]
RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]
# AlphaImageLoader for IE and fancybox
RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
Header add Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
#If rewrite mod isn't enabled
ErrorDocument 404 /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
임. 새로운 웹 서비스가 추가되고 활성화되었습니다.
다른 방법으로,이 같은 내 000-default.conf 아파치 파일을 구성한 : 당신은 더 많은 데이터를 필요로하는 경우
<VirtualHost 127.0.0.1:8080>
DocumentRoot /opt/prestashop_folder/
ServerName mydomain.com
ServerAlias www.mydomain.com
<Directory /opt/prestashop_folder>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
알고하지 마십시오. 시간 내 줘서 고마워.