Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将wordpress迁移到nopCommere后如何将客户重定向到正确的URL_Wordpress_Url_Redirect_Http Status Code 301_Nopcommerce - Fatal编程技术网

将wordpress迁移到nopCommere后如何将客户重定向到正确的URL

将wordpress迁移到nopCommere后如何将客户重定向到正确的URL,wordpress,url,redirect,http-status-code-301,nopcommerce,Wordpress,Url,Redirect,Http Status Code 301,Nopcommerce,我们已经将我们的网站从wordpress迁移到nopcommerce。现在,我们所有的老客户都试图使用wordpress支持的旧urlwww.domain.com/product/{product url}打开产品页面 但是nopCommerce的结构类似于www.domain.com/{product url} 是否仍然可以重定向到具有正确产品页面的新url 谢谢, Jatin有两种方法可以让新URL正常工作。 1). 将重写规则添加到web.config文件,该文件只需检查请求的URL格式,

我们已经将我们的网站从wordpress迁移到nopcommerce。现在,我们所有的老客户都试图使用wordpress支持的旧urlwww.domain.com/product/{product url}打开产品页面

但是nopCommerce的结构类似于www.domain.com/{product url}

是否仍然可以重定向到具有正确产品页面的新url

谢谢,
Jatin

有两种方法可以让新URL正常工作。
1). 将重写规则添加到web.config文件,该文件只需检查请求的URL格式,如果它包含
/product/
,则它将重定向到product slug

<system.webServer>
    <rewrite>
      <rules>        
        <rule name="rewritewithfallback">
          <match url="(.*)product/(.*)$" />          
          <action type="Redirect" url="{R:2}"  redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
  ......
 ......

</system.webServer> 

......
......
2) 。为一种常见的操作方法添加重写规则,即按代码重定向到产品操作的代码

注意:请使用incognito窗口进行检查,否则您将因为兑现而出现意外的重定向行为


希望这有帮助

有两种方法可以使新URL正常工作。
1). 将重写规则添加到web.config文件,该文件只需检查请求的URL格式,如果它包含
/product/
,则它将重定向到product slug

<system.webServer>
    <rewrite>
      <rules>        
        <rule name="rewritewithfallback">
          <match url="(.*)product/(.*)$" />          
          <action type="Redirect" url="{R:2}"  redirectType="Permanent" />
        </rule>
      </rules>
    </rewrite>
  ......
 ......

</system.webServer> 

......
......
2) 。为一种常见的操作方法添加重写规则,即按代码重定向到产品操作的代码

注意:请使用incognito窗口进行检查,否则您将因为兑现而出现意外的重定向行为

希望这有帮助