Forum Moderators: phranque
ScriptAlias URL-path file-path¦directory-path
Maps URLs to filesystem locations AND designates the target as a CGI script
Essentially ScriptAlias aliases the location and informs Apache that files in that directory are intended to be executable.
If you are trying to set up a file within the directory as an Alias, and have it be executable, then you'll want to use ScriptAlias.
You may be having an issue setting an Alias that is a child of a ScriptAlias, and you'll want to simply set up two ScriptAliases with the full path to handle it:
ScriptAlias /scripts "/usr/local/scripts/wwwroot/cgi-bin/" ScriptAlias /this "/usr/local/scripts/wwwroot/cgi-bin/myperl.pl?param=1" or even in any other directory:
ScriptAlias /this "/usr/somestuff/myperl.pl?param=1" Is this what you are wondering about?
In addition to the mod_rewrite approach, what about simply pointing to the script without the parameter and using the parameter as the default in the script itself? (i.e. if!param { param=1 }) That way it should fire and give you the same result you would have gotten if the param were passed, and when a param is actually passed by a different invocation it should override the default ... maybe?
ScriptAlias /this "/usr/local/scripts/wwwroot/cgi-bin/myperl.pl" and then invoking it with a different param:
http://yadda.com/this/?param=2 (Still too lazy to check it ... :( )