IBM商业搜索引擎优化的URL问题Ajax调用 [英] IBM Commerce SEO URL issue with Ajax calls

查看:180
本文介绍了IBM商业搜索引擎优化的URL问题Ajax调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用WCS7 FEP7。我只是使搜索引擎按照以下步骤。

  1. 在httpd.conf中修改
  

重写规则^ /(。*)$ / web应用/ WCS /存储/的servlet / $ 1 [PT,NC]

<醇开始=2>
  • WC-server.xml中修改
  •  &LT; SEOConfiguration defaultUrl =dynamicUrl =真正的启用=真正的&GT;
         &LT;上下文根改写值=//&GT;
     &LT; / SEOConfiguration&GT;
     

    我已经运行了关键字代job..All搜索引擎的网址都上来了nice.but OOB Ajax调用失败了。

    添加到购物车AJAX调用失败.. 我请参阅http:/// AjaxOrderChangeServiceItemAdd阿贾克斯POST呼叫被触发.. 我收到404错误。 凡为商业服务器需要的http:///的webapp / WCS /存储/的servlet / AjaxOrderChangeServiceItemAdd

    我试图把一个重写规则添加的webapp / WCS /存储/ servlet的这个特殊request..As这是一个POST调用(在车身参数),这将无法正常工作。

      

    重写规则/ AjaxOrderChangeServiceItemAdd $   / Web应用程序/ WCS /存储/的servlet / AjaxOrderChangeServiceItemAdd?数据= $ 1   [NC,L] <

    我失去了一些东西?

    请帮忙。

    解决方案

    尝试this..In低于code剪断,则需要分别通过你的店面和产品目录的ID。

      RewriteEngine叙述上
    重写规则^ /?$ /webapp/wcs/stores/servlet/TopCategoriesDisplay?storeId=<storeId>&catalogId=<catalogId> [L,QSA,PT]
    的RewriteCond%{REQUEST_URI}!^ / robots.txt的$
    的RewriteCond%{REQUEST_URI}!^ / sitemap.xml的(。广州)?$
    的RewriteCond%{REQUEST_URI}!^ / Solr的。* $
    的RewriteCond%{REQUEST_URI}!^ / lobtools。* $
    的RewriteCond%{REQUEST_URI}!^(/)?$
    的RewriteCond%{REQUEST_URI}!^ / Web应用程序。* $
    的RewriteCond%{REQUEST_URI}!^ / wcsstore。* $
    的RewriteCond%{REQUEST_URI}!^ / ConsumerDirectStorefrontAssetStore。* $
    的RewriteCond%{REQUEST_URI}!^ / WPS。* $
    的RewriteCond%{REQUEST_URI}!^ /图像/.*$
    的RewriteCond%{REQUEST_URI}!^ /图标\ .ICO
    (。*)重写规则^ / / Web应用程序/ WCS /存储/的servlet / $ 1 STOREID =&LT; STOREID&GT; [QSA,PT]
     

    i am using WCS7 FEP7. i just enabled seo following below steps.

    1. httpd.conf changes

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

    1. wc-server.xml changes

    <SEOConfiguration  defaultUrl=""  dynamicUrl="true" enable="true">
         <context-root-rewrite value="/"/>
     </SEOConfiguration>
    

    I have run the keyword generation job..All SEO URLs are coming up nice.but OOB ajax calls are failing.

    Add to cart ajax calling is failing.. I see http:///AjaxOrderChangeServiceItemAdd Ajax POST call is being triggered.. I am getting 404 error. Where as Commerce server needs http:///webapp/wcs/stores/servlet/AjaxOrderChangeServiceItemAdd

    I tried to put a rewrite rule to add 'webapp/wcs/stores/servlet' for this particular request..As this is a POST call (parameters in the body), it would not work properly.

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

    Am i missing something here.?

    Please help.

    解决方案

    Try this..In the code snipped below, you need to pass your store and catalog ids respectively.

    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]
    

    这篇关于IBM商业搜索引擎优化的URL问题Ajax调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆