$(document).ready(function() { $('pre code').each(function(i, block) { hljs.highlightBlock(block); }); });

Tuesday, September 2, 2014

Joomla 1.5, broken/ dead links removal

Permanent fix for Joomla (1.5) dead links
Hi,
This one project I've been working on, it's based on Joomla 1.5 and it's pretty messed up with most of the code having coded in core. So, having a walk through any upcoming issues is really messy and boring.
I was reported by the SEO team that I had about 2000 broken/ dead links on my site. When I checked through, they were the 404 Pages. I told that, "that's why 404 pages are!.. to tell you that this link doesn't exist on this site..!" but then they told me, it's going to affect badly Google organic search of my site and hence I had to remove those dead links anyway!
I had no idea what to do. So, I began with what I always do when I've got nothing to start with... hey, no, I didn't sit up to pray to god! I just opened google and described my problem. So, I got few links which I would like to share with you:
How to Resolve Broken Website Links in Joomla 2.5? | OGO Sense
Joomla SEF Menu Links Incorrect 404 Errors 
However, these links didn't fix my problem but gave me an insight. 
I had the list of 404 URLs but I didn't know what to do; the SEO team had asked me to delete them, but how could you delete something that doesn't even exist! (However, it did, in  jos_redirection  table but I was afraid if deleting any of them may raise further issues). Create a  301  redirect  request for 2000+ URLs was a mess. So, what I did was:
1. I created an Excel file containing all those URLs.
2. I read that file into an array.
3. I checked if $_SERVER['REQUEST_URI'] was in_array  containing list of URLs. If it did, I simply redirected the request to homepage using header('Location:homepage');  
4. Then I checked at www.brokenlinkcheck.com and voila, it didn't report those links then!
I hope this helped you. Feel free to comment or suggest.


Contact Me

Name

Email *

Message *