MyBB Community Forums

Full Version: Rel="nofollow" all the external links... [Code Modifications]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Please MyBB developer help me I use this code and it adds nofollow to all including my internal urls please help me to make it work.

my internal url: http://letsforum.com

go to your Admin CP, Configuration, MyCode, Add new MyCode:

Title: Nofollow
Short description: No follow links
Regular Expression : <a href="http([s]?)://(.*?)"
Replacement : <a href="http$1://$2" rel="nofollow"
Enabled: Yes

Save.

(the following MyCode will enable the internal links to be followed by search engines)

Add new MyCode:

Title: Dofollow
Short Description: Dofollow links
Regular Expression: <a href="http([s]?)://(|www\.)YOURWEBSITE.TLD(.*?)" rel="nofollow"
Replacement * <a href="http$1://$2YOURWEBSITE.TLD$3"

Replace "YOURWEBSITE.TLD" by your website . tld (example google.com)
Enabled: Yes
One thread is enough. You do not need multiple threads.

http://community.mybb.com/thread-141384.html