2

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 Answers1

0

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.

trejder
  • 17,148
  • 27
  • 124
  • 216
  • Thanks for the reply. Its a shared server so i wont have access to the conf files. Is there any way i can achieve this? I just want all the traffic and google PR to go to the homepage so they are not lost. – user1469316 Jun 20 '12 at 13:34
  • Well... IF it is a shared hosting, then I would address such questions to hosting admin at first. You're customer, you should be supported. Any solution someone will bring you here, may turn out to be useless, because you won't be able to adapt it to your shared account. I would highly advice on contacting server admin / support at first. – trejder Jun 20 '12 at 15:20
  • ok, will do. Thanks for the advice. Appreciate it. regards, K. – user1469316 Jun 20 '12 at 20:49
  • Glad, I could help. If it isn't any problem for you, please, mark (select) my answer ("yes" checkmark next to voting), which can bring me some reputation here. Thank you. – trejder Jun 21 '12 at 07:15