Fix my code - Header Script that adds nofollow tag
$10-30 USD
Terminado
Publicado hace alrededor de 8 años
$10-30 USD
Pagado a la entrega
I am using a script in the header of my website to make all external links rel=nofollow. The code works but I need to be able to make certain domains dofollow.
Here is what I am using:
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('a[href*="http://"]:not([href*="[login to view URL]"])').attr('rel', 'nofollow');
jQuery('a[href*="https://"]:not([href*="[login to view URL]"])').attr('rel', 'nofollow');
});
</script>
I need to be able to add 2-3 more domains as an exception. I am using 'SocialEngine' so I only have limited access to files which is why I need to make this work using the header script.