Error when trying to rewrite url to one cgi script to another.

Discussion in 'Apache' started by andyaim, Jul 1, 2010.

  1. #1
    Hi all,

    I am getting a 404 error when trying to rewrite one cgi script to another one such as:

    Options FollowSymLinks
    RewriteEngine on
    RewriteRule ^from.cgi to.cgi

    With this rule above my expectaion is that the following url:

    mydomain/cgi-bin/from.cgi will be rewritten to mydomain/cgi-bin/to.cgi.

    Instead I get the following error in the browser:

    "The requested URL /Program Files/Apache Software Foundation/Apache2.2/cgi-bin/to.cgi was not found on this server."

    This is the error in the error.log

    "[Thu Jul 01 10:51:57 2010] [error] [client 127.0.0.1] File does not exist: C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/Program Files"

    This is strange as it is referencing the htdocs folder which is not being utulized for this request.

    Any feedback is greatly appreciated.

    Cheers,
    Andy
     
    andyaim, Jul 1, 2010 IP