我们已经准备好了,你呢?

2024我们与您携手共赢,为您的企业形象保驾护航!

随着越来越多的站长开始重视SEO了,对rel="nofollow"也在乎得多了。但是由于百度编辑器ueditor并不自带rel="nofollow"功能,在引入其他站点URL链接的时候,就会导致蜘蛛流失,自己的网站权重下降。

今天AB模板网整理了一下,来教大家怎么改,让ueditor的link自带rel="nofollow"标签,话不多说,直接上图。 

1、找到/core/extend/ueditor/dialogs/link/link.html,修改第81行。

pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签

'href' : href,

'target' : $G("target").checked ? "_blank" : '_self',

'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),

'_href':href

修改成:

'href' : href,

'target' : $G("target").checked ? "_blank" : '_self',

'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),

'rel': 'nofollow',

'_href':href

2、找到/core/extend/ueditor/ueditor.config.js,修改第370行。

pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签

a:      ['target', 'href', 'title', 'class', 'style','name','id'],

abbr:   ['title', 'class', 'style'],

abbr:   ['title', 'class', 'style'],

area:   ['shape', 'coords', 'href', 'alt'],

修改成:

a:      ['target', 'href', 'title', 'class', 'style','name','rel','id'],

abbr:   ['title', 'class', 'style'],

abbr:   ['title', 'class', 'style'],

area:   ['shape', 'coords', 'href', 'alt'],

上述两个文件修改好就可以实现rel="nofollow"了,网站后台测试添加链接,测试成功,演示图如下。

pbootcms百度编辑器UEDITOR给超链接默认添加rel="nofollow"标签

顶牛网络凭借多年的网站建设经验,坚持以“做实用有价值的网站”为宗旨,累计为1200多家客户提供品质建站服务,得到了客户的一致好评。如果您有网站建设、网站改版、网络推广、域名注册、主机空间、托管维护、网站备案等方面的需求...
请立即拨打咨询热线:15906391238,我们会为您贡献全力。 项目经理在线 收藏文章

全力 · 以赴

注重专业探索,摒弃虚浮夸张,为所有的企业机构贡献全力。