Forum Moderators: open
Ok here are two versions the short version and the long version, the short version basically explains my questions, the long version answers the WHY I am asking question and mentions what I have done
The short version
Site has lots of old files in various directories on it that need redirecting, these old files contain a link to a javascript file, i am thinking of replacing the contents of this file with a javascript redirect
<!--
window.location = "http://www.mysite.com/"
//-->
and that's it for the short version
The long version
(read the short version as well)
Site has 100s of thousands of pages in various directories, every time pages have been added/replaced the old pages have been left on the site rather than being removed (all links to the pages have supposedly been removed), consequently there are a lot of old pages up there, and although they shouldn't be linked customers seem to be able to find them and are able to purchase from them at old prices!
I am not allowed to delete these pages, but I have been writing redirects (.htaccess 301) for the most recently replaced pages.
The issue is the sheer number of redirects that would be required (my estimated finishing date is mid 2008, the boss wants it done in a fortnight)
The main difference between the old files and the new ones is that about 6 months ago the company changed the site livery and with that the name of the javascript file that it had used for the previous 3 years
I can't sort by file name because what is a current filename in one directory is an old filename in another directory, which also means i can't sort by directory as their are hundreds of directories which have anywhere from 2 - 4000 files in each of them,
The main reason i have come to the javascript side is that i have exhausted what i can do on the apache side, i would estimate i am catching 70% of the old files, but the problem now is that the majority of rules I am writing now are only removing 1 or 2 files at most, there are no more big catch-all rules that i can write
I was hoping that javascript could remove the other 30% in one fell swoop, but then i read that search engines may not like it