muban大师 发表于 2022-2-13 09:56:18

pbootcms百度编辑器UEDITOR给网页链接默认设置加上rel="nofollow"标识

伴随着越来越多网站站长逐渐高度重视seo了,对rel="nofollow"也在意的多了。但由于百度编辑器ueditor并不由自主带rel="nofollow"作用,在引进别的网站URL连接的情况下,就会造成蛛蛛外流,自已的百度权重降低。

今日AB免费模板整理了一下,来简单地怎么弄,让ueditor的link自带rel="nofollow"标识,啥也不说了,直接用图。

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


https://www.adminbuy.cn/uploads/allimg/220213/1-220213100025347.png



'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行。


https://www.adminbuy.cn/uploads/allimg/220213/1-2202131003253K.png



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',,


以上2个文件修改好就能实现rel="nofollow"了,网站后台管理检测加上连接,检测取得成功,演试图如下所示。


https://www.adminbuy.cn/uploads/allimg/220213/1-22021310061J03.png
页: [1]
查看完整版本: pbootcms百度编辑器UEDITOR给网页链接默认设置加上rel="nofollow"标识