Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    CBG
    CBG is offline
    New Coder
    Join Date
    Feb 2010
    Location
    UK
    Posts
    91
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Redirect getting 500 error

    Hi,

    We have just moved our website, and we getting visits going to index.cgi still, we moved to .php now.

    So I thought I would put a redirect script in place call index.cgi

    Code:
    #!/usr/bin/perl
    print "Location: http://www.example.com/\n\n";
    But I am getting 500 error, any ideas?
    Regards,
    CBG

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Have you checked the error log?

  • #3
    CBG
    CBG is offline
    New Coder
    Join Date
    Feb 2010
    Location
    UK
    Posts
    91
    Thanks
    26
    Thanked 0 Times in 0 Posts
    Nothing in there, other then can't find 500.shtml (error page)
    Regards,
    CBG

  • #4
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,871
    Thanks
    2
    Thanked 164 Times in 159 Posts
    Does your shebang line have the correct path to perl?

    Are the file permissions set correctly so the web server can execute the script?

    Is the script in the proper directory for cgi scripts?

    Is the web server configured to execute files with a .cgi extension?

    Do you have any other .cgi scripts that are working?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •