2
我需要帮助修改此相对=“规范”的自动选择页面的URL,我有海基会开启和使用Joomla .htacces的Joomla网页的rel =“规范”
<link rel="canonical" href="http://www.yourwebsite.com<?php echo $_SERVER['PHP_SELF']; ?>" />
这个声明让我知道该网站的主要网址。
感谢
我需要帮助修改此相对=“规范”的自动选择页面的URL,我有海基会开启和使用Joomla .htacces的Joomla网页的rel =“规范”
<link rel="canonical" href="http://www.yourwebsite.com<?php echo $_SERVER['PHP_SELF']; ?>" />
这个声明让我知道该网站的主要网址。
感谢
用途:JURI::current()
在您的代码:
<link rel="canonical" href="<?php echo JURI::current(); ?>" />
很好的回答。尽可能使用Joomla的API通常是最好的选择。 – isherwood
@GerriJensen如果它工作正常,请点击旁边的绿色图标批准这一答复。 – jackJoe