Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Solution to change of perl script location

Options
  • 02-05-2009 11:59pm
    #1
    Moderators, Technology & Internet Moderators, Regional South East Moderators Posts: 28,497 Mod ✭✭✭✭


    So I have an old site of mine thats very rarely updated and I keep it alive for the sake of it at this stage, for years its been hosted on godaddy.com but recently I've moved all my sites to blacknight

    I'm pretty impressed with BK but I have one problem with one of my sites,
    the site operates a simple perl script that is located in domain.com/script.cgi and about 2k plus files link to this.

    The problem is however is that BK will only allow scripts to be executed in the cgi-bin folder (atleast according to the CP panel info), so in order to fix the site I'd have manually change all 2kplus links to domain.com/cgi-bin/script.cgi along with other associated changes to make the site work after the script is used at the new location.

    Its an awful pain as the site isn't PHP or anything as its a site first made back in 1999 so everything will be manual.

    Anybody have any solutions so that I don't have to do a huge amount of manual work?


Comments

  • Subscribers Posts: 9,716 ✭✭✭CuLT


    Symbolic link.
    ln -s /path/to/cgi-bin/script.cgi /place/you/want/script.cgi
    


  • Registered Users Posts: 7,412 ✭✭✭jmcc


    Cabaal wrote: »
    Anybody have any solutions so that I don't have to do a huge amount of manual work?
    It might be possible to write a script in Perl to find and replace the links in those files that link to the script. Apart from that, a symbolic link as CuLT suggested might work (as long as the security model allows it).

    Regards...jmcc


  • Moderators, Technology & Internet Moderators, Regional South East Moderators Posts: 28,497 Mod ✭✭✭✭Cabaal


    Just to give a bit more info on this to see if Cult's solution will work

    as stated its a simple script thats located in domain.com/script.cgi and there are 2k plus links to this
    the links look like
    domain.com/script.cgi?dir1/dir2/filename.html
    so when the script does its job everything returns to
    domain.com/dir1/dir2/filename.html

    so would changing htaccess fix this and allow it to work?


Advertisement