0

我正在使用 WCS7 FEP7。我刚刚按照以下步骤启用了 seo。

  1. httpd.conf 更改

RewriteRule ^/(.*)$ /webapp/wcs/stores/servlet/$1 [PT,NC]

  1. wc-server.xml 更改
<SEOConfiguration  defaultUrl=""  dynamicUrl="true" enable="true">
     <context-root-rewrite value="/"/>
 </SEOConfiguration>

我已经运行了关键字生成作业..所有 SEO URL 都很好。但是 OOB ajax 调用失败了。

添加到购物车 ajax 调用失败。我看到 http:///AjaxOrderChangeServiceItemAdd Ajax POST 调用正在被触发。我收到 404 错误。Commerce 服务器在哪里需要 http:///webapp/wcs/stores/servlet/AjaxOrderChangeServiceItemAdd

我试图设置一个重写规则来为这个特定的请求添加“webapp/wcs/stores/servlet”。由于这是一个 POST 调用(正文中的参数),它不能正常工作。

RewriteRule /AjaxOrderChangeServiceItemAdd$ /webapp/wcs/stores/servlet/AjaxOrderChangeServiceItemAdd?data=$1 [NC,L]‹</p>

我在这里错过了什么吗?

请帮忙。

4

3 回答 3

0

阅读下面的内容并尝试一下,它与您所做的有点不同

http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.starterstores.doc/tasks/tsmshortenmadisonsurl.htm

于 2014-12-17T20:02:51.943 回答
0

正如 http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.starterstores.doc/tasks/tsmshortenmadisonsurl.htm中所述

`如果您要指定空白上下文根,请改用以下格式:

重写引擎开启

RewriteRule ^/(?!wcsstore)(.*) /webapp/wcs/stores/servlet/$1 [PT,L]`

SEO 引擎不应该关心它是否是 POST 请求。无论如何都会发送数据。

确保您已从 wcf:url 创建了 AJAX 调用

http://www-01.ibm.com/support/knowledgecenter/SSZLC2_7.0.0/com.ibm.commerce.component-services.doc/refs/rwvwcfurl.htm

于 2015-01-09T11:18:07.543 回答
0

试试这个..在下面的代码中,您需要分别传递您的商店和目录 ID。

RewriteEngine on
RewriteRule ^/?$ /webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=<storeId>&catalogId=<catalogId> [L,QSA,PT]
RewriteCond %{REQUEST_URI} !^/robots.txt$
RewriteCond %{REQUEST_URI} !^/sitemap.xml(.gz)?$
RewriteCond %{REQUEST_URI} !^/solr.*$
RewriteCond %{REQUEST_URI} !^/lobtools.*$
RewriteCond %{REQUEST_URI} !^(/)?$
RewriteCond %{REQUEST_URI} !^/webapp.*$
RewriteCond %{REQUEST_URI} !^/wcsstore.*$
RewriteCond %{REQUEST_URI} !^/ConsumerDirectStorefrontAssetStore.*$
RewriteCond %{REQUEST_URI} !^/wps.*$
RewriteCond %{REQUEST_URI} !^/images/.*$
RewriteCond %{REQUEST_URI} !^/favicon\.ico
RewriteRule ^/(.*) /webapp/wcs/stores/servlet/$1?storeId=<storeId>[QSA,PT]
于 2015-01-14T14:01:47.953 回答