PDA

View Full Version : Redirect on a whole subdirectory


Mandi
07-19-1999, 12:01 AM
I am closing down one of my subdirectories (lots of individual pages, close to 70) to be replaced with an (up and running) different function (a searchable thing, therefore, just one start page) - is there a simple .htaccess command I can place in the old subdirectory for redirect, should someone hit them with a bookmark or an internal link I overlooked . . . or do I really need to do the meta tag redirect thing for each page?

Justin
07-19-1999, 12:48 AM
Quick and dirty - in an .htaccess file inside the directory in question:

ErrorDocument 404 index.html

Assuming index.html is the file you now want them to go to. Basically, if someone gets a 404 error, instead of seeing an error page, they will simply be directed to the index page.

Now I just thought about IE5 and it's custom error messages - I am hoping not too many people actually have that setting enabled... but hopefully that shouldn't be a problem.

Hope this helps :)

------------------
Justin Nelson
FutureQuest Support

Mandi
07-19-1999, 01:05 PM
This worked like a charm, thanks Justin![nbsp][nbsp]The only refinement I made, was to put a link on the destination page that reads, "Did you arrive here from (the old link)?[nbsp][nbsp]Click[nbsp][nbsp]here to reset your bookmark . . ." since the resulting page is actually a 404 and therefore shows a URL of the "wrong" page, which will not help with bookmarks . . . definately worth these few lines of HTML, to use "quick and dirty" and be able to just empty that directory . . . bye bye, 1 MB!!