2
votes

i have lots of links which i cant get changed going to old directories on my site. These directories are all ihn the cgi-bin directory. One such link which no longer exists is:

http://www.domain.org.uk/cgi-bin/admin/uploads/documents/health_key.pdf

I have the following rule in my .htaccess

ErrorDocument 404 http://www.domain.org.uk

I want all non working links to go to my homepage but although the 404 works for most pages, it does not work for any links in the cgi-bin directory. How can i solve this?

Regards, Kate

1

1 Answers

0
votes

Checkout configuration of your server (.htconf file, if it is Apache and if you have access to it) for the section about cgi-bin / scripts configuration. Or the .htaccess file for your root folder (the folder that contains cgi-bin folder inside).

AFAIK, cgi-bin folder is mostly configured to hold executable scripts. This directory should not contains any directly accessed, non-executable files (like PDF in your example). AFAIK, standard HTTP rules (like the one for 404 error) does not apply for cgi-bin folder, as this one is mostly threated as special one (for example -- will be auto re-created on most servers, if you delete it).

Cheers, T.