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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/64.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
Templates 如何在Opencart标题中返回url(没有域名)?_Templates_Url_Header_Return_Opencart - Fatal编程技术网

Templates 如何在Opencart标题中返回url(没有域名)?

Templates 如何在Opencart标题中返回url(没有域名)?,templates,url,header,return,opencart,Templates,Url,Header,Return,Opencart,在我的opencart multistore中,防止Google将我的网站标记为重复内容。我想在标题中添加rel=“alternate”代码: 例如: In the Dutch website template: <link href=”http://www.website.be/pagina-x/” hreflang=“nl-BE” rel=”alternate” /> In the Belgian website template: <link href=”http://

在我的opencart multistore中,防止Google将我的网站标记为重复内容。我想在标题中添加rel=“alternate”代码:

例如:

In the Dutch website template:
<link href=”http://www.website.be/pagina-x/” hreflang=“nl-BE” rel=”alternate” />

In the Belgian website template:
<link href=”http://www.website.nl/pagina-x/” hreflang=“nl-NL” rel=”alternate” />
<代码>在荷兰网站模板中: 在比利时网站模板中: 为此,我需要返回当前页面链接,不带域名。例如:/product/product-x

<link href=”http://www.website.be/[current-url]” hreflang=“nl-BE” rel=”alternate” />

我该怎么做


我正在使用Opencart 1.5.5.1,seo url设置为yes,seo pack pro

您可以使用$\u服务器['REQUEST\u URI']获取当前url(不带域名)。

您可以使用$\u服务器['REQUEST\u URI']获取当前url(不带域名)。谢谢您!你能接受这个答案吗。