You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Thomas Gabrielsen <ap...@arton.no> on 2004/08/26 19:45:15 UTC

[users@httpd] Redirecting (virtual host)

I have this server with different virtual host set up like the one belove

<VirtualHost *:80>
    ServerAdmin webmaster@mydomain.com
    DocumentRoot C:/webdir/www
    ServerName mail.mydomain.com
    ErrorLog logs/mail.mydomain.com-error_log
    CustomLog logs/mail.mydomain.com-access_log commonvhost
</VirtualHost>
Now, I would like to redirect this adress (mail.mydomain.com) to another 
path that is not under the default server document root (C:/webdir/www). 
Like for instance, C:/Program Files/Apache Group/Apache2/cgi-bin/mail.exe. 
Can anyone tell me how to do this? What I'm looking for is some kind of 
redirect.

Thanks,
Thomas Gabrielsen 


---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Per URL redirect & alert

Posted by iIDC Support <su...@iidc.org>.
Does anyone know how to program a per URL alert..?

I need to have a banner popup the first time (and only the first time) a
particular URL is requested.

Any suggestions are greatly appreciated..!

Thomas


---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirecting (virtual host)

Posted by Joshua Slive <js...@gmail.com>.
On Thu, 26 Aug 2004 19:45:15 +0200, Thomas Gabrielsen <ap...@arton.no> wrote:
> I have this server with different virtual host set up like the one belove
> 
> <VirtualHost *:80>
>     ServerAdmin webmaster@mydomain.com
>     DocumentRoot C:/webdir/www
>     ServerName mail.mydomain.com
>     ErrorLog logs/mail.mydomain.com-error_log
>     CustomLog logs/mail.mydomain.com-access_log commonvhost
> </VirtualHost>
> Now, I would like to redirect this adress (mail.mydomain.com) to another
> path that is not under the default server document root (C:/webdir/www).
> Like for instance, C:/Program Files/Apache Group/Apache2/cgi-bin/mail.exe.
> Can anyone tell me how to do this? What I'm looking for is some kind of
> redirect.

You are not very precise by what you mean by "redirect".  Do you want
all requests for that domain to be served from this script?  Or do you
just want requests for the home page to be served from there?  Do you
want the users to see the new URL, or do you want them to see only the
hostname?

One possibility is
ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache2/cgi-bin/"
RedirectMatch ^/$ http://mail.mydomain.com/cgi-bin/mail.exe

This will redirect only the home page, and will allow users to see the new URL.

More details are at
http://httpd.apache.org/docs-2.0/urlmapping.html

Joshua.

---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org