Forum Moderators: coopster

Message Too Old, No Replies

Redirecting levels of Folders

         

username

12:08 am on Feb 25, 2009 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi all, I have a 404 error page which is run from my .htaccess file with the following command:

ErrorDocument 404 /error/index.php

I have a set of folders which depict date i.e. http://www.example.com/2008/12/31/(Folder Name) which do not redirect to the error page using this. Within the year, month and day folders of which there are no index.php files, they do not redirect. These folders only include folders of the lower directories. Is there a way to fix this without thousands of redirect scripts?

Thanks.

coopster

12:30 am on Mar 3, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could use Apache mod_rewrite to check for the existence of an index file in each directory and if one does not exist, send a 404 response.