store links to 404's - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: store links to 404's (/showthread.php?tid=14680) |
store links to 404's - El Forum - 01-11-2009 [eluser]bjora857[/eluser] I am releasing a new version of my website. Most pages have the same urls as the previous version. But some pages have new url's for example: mysite.com/gallery/45 is now: mysite.com/canvas/78. Since other sites are linking to the old url. I am expecting some 404's I was wondering if I could store in a database what pages are giving 404's and then manually add a 301 redirect to the new url. What should I put on my 404 to see what urls the visitors are trying to reach ? store links to 404's - El Forum - 01-11-2009 [eluser]Tom Glover[/eluser] You could just configure your routes to route them to the new url, but u could also use .htaccess to route certain urls or bits of urls. Both of those options save the user the trouble of arriving at a 404. If you have to use 404's say something like your site has just been updates, and either point them to the new link or a search page, or your home page. store links to 404's - El Forum - 01-14-2009 [eluser]bjora857[/eluser] thanks for the reply, I'll go with the .htaccess solution. I will also add google analytics code on the 404 page, so I can see if I have forgot to redirect any links. |