> -----Original Message-----
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Júlio Maranhão
> Sent: Tuesday, October 10, 2006 5:24 PM
> To: [email protected]
> Subject: [EMAIL PROTECTED] How to use DirectoryIndex when 
> SetHandler is perl-script?
> 
> I want
> http://some.site/webcal
> or
> http://some.site/webcal/
> to call
> http://some.site/webcal/webcal.pl
> 
> DirectoryIndex webcal.pl does not work inside the Directory 
> below.

This is because the ScriptAlias directive is telling apache that the directory 
contains scripts. So apache never goes near the directory listing mechanisms 
and so never sees any DirectoryIndex...

Before plunging into mod-rewrite, you might like to see if a simpler solution 
(at the cost of a new directory) would work for you; 

- make "webcal" a plain directory (ie, not ScriptAlias)
- make a new dummy directory containing the program and ScritpAlias this
- set the DirectoryIndex of webcal to point to the program in the dummy dir

Eg,

ScriptAlias /dummy-cgi /path/to/dummy-cgi

<Directory /path/to/webcal>
  DirectoryIndex /dummy-cgi/webcal.pl
</Directory>

ScriptAlias /dummy-cgi /path/to/dummy-cgi

now http://some.site/webcal/ will go into the /path/to/webcal directory, find 
the DirectoryIndex and execute a request for /dummy-cgi/webcal.pl. This will 
follow the ScriptAlias and execute /path/to/dummy-cgi/webcal.pl. NOte that the 
browser will keep the location set to http://some.site/webcal/ so no-one will 
be any the wiser and "dummy-cgi" won't appear on the web.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 


> So I tried 
> mod_rewrite. No luck. I never used it before. Any help?
> 
> PerlRequire "E:/Open/webcal/cgi-bin/startup.pl"
> Alias /webcal "E:/Open/webcal/cgi-bin"
> RewriteEngine On
> RewriteRule  ^/webcal$   /webcal/webcal.pl  [R=permanent]
> <Directory "E:/Open/webcal/cgi-bin">
>      AllowOverride All
>      SetHandler perl-script
>      PerlResponseHandler ModPerl::Registry
>      PerlOptions +ParseHeaders
>      Options +ExecCGI
>      Allow from all
> </Directory>
> 
> Júlio
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
 
 
This message is for the named person's use only. It may contain confidential, 
proprietary or legally privileged information. No confidentiality or privilege 
is waived or lost by any mistransmission. If you receive this message in error, 
please notify the sender urgently and then immediately delete the message and 
any copies of it from your system. Please also immediately destroy any 
hardcopies of the message. You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. The sender's company reserves the right to monitor all e-mail 
communications through their networks. Any views expressed in this message are 
those of the individual sender, except where the message states otherwise and 
the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to