Thanks for your help. This is the solution I came up with under the
VirtualDomain directive for webmail.mydot.net.
Redirect /index.html http://webmail.mydot.net/cgi-bin/webmail
Seems to be working for me. I'm not seeing any errors in the logs or the
behavior of the application.
Thanks again,
Jim
----- Original Message -----
From: "Brian Candler" <[EMAIL PROTECTED]>
To: "Jim Kubicek" <[EMAIL PROTECTED]>
Cc: "sqwebmail" <[EMAIL PROTECTED]>
Sent: Tuesday, July 29, 2003 5:47 PM
Subject: Re: [sqwebmail] [OT]? - CGI Redirect (Apache2)
> On Tue, Jul 29, 2003 at 05:18:02PM -0500, Jim Kubicek wrote:
> > Clear DayI am sure this is off topic, but I could not find an answer to
my
> > problem anywhere yet.
> >
> > My current implementation of sqwebmail is located at the following URL:
> > http://www.mydot.net/cgi-bin/webmail
> >
> > I want to be able to rewrite that in the config to:
> > http://webmail.mydot.net
> >
> > and have it still execute the webmail binary.
> >
> > Can anyone help here?
>
> My suggestion is to configure a URL to access the CGI like this:
>
> http://webmail.mydot.net/webmail
>
> This is so that webmail.mydot.net/images still works as expected. You can
> achieve this using ScriptAlias, something like:
>
> ScriptAlias "/webmail" "/usr/local/apache/cgi-bin/sqwebmail"
>
> Then put an index.html at http://webmail.mydot.net/ which redirects to
> http://webmail.mydot.net/webmail:
>
> <html>
> <head>
> <meta http-equiv="refresh" content="0; url=/webmail">
> </head>
> <body>
> <p>If your browser does not refresh automatically, please
> <a href="/webmail">click here</a> to continue</p>
> </body>
> </html>
>
> The net effect is that going to webmail.mydot.net will work, and there
won't
> be any 'cgi-bin' in the URL displayed in the browser, which I think is a
> pretty close approximation to what you want.
>
> Cheers,
>
> Brian.
>