You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Al Sparks <da...@yahoo.com> on 2007/11/22 03:11:44 UTC

[users@httpd] Redirect in httpd.conf

Here's a partial in my httpd.conf:
<VirtualHost *>
      ServerName www.foo.com
      ServerAdmin ars@gvea.com

      ProxyRequests Off
      ProxyPass /directory http://server.bar.com:1234/directory/
      ProxyPassReverse /directory http://server.bar.com:1234/directory/
</VirtualHost>

Running Apache 1.3.x.  So I've got this to work so that when you type in:
   http://www.foo.com/directory
it reverse proxies to http://server.bar.com:1234/directory/

I'd also like to redirect so that if you try to go to:
   http://www.foo.com

it redirects to http://www.foo.com/directory.

How exactly would I do a redirect command?
    === Al



---------------------------------------------------------------------
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] Redirect in httpd.conf

Posted by chris <ch...@ia.gov>.
RedirectMatch ^/$    http://www.foo.com/directory

chris

Al Sparks wrote:
> Here's a partial in my httpd.conf:
> <VirtualHost *>
>       ServerName www.foo.com
>       ServerAdmin ars@gvea.com
>
>       ProxyRequests Off
>       ProxyPass /directory http://server.bar.com:1234/directory/
>       ProxyPassReverse /directory http://server.bar.com:1234/directory/
> </VirtualHost>
>
> Running Apache 1.3.x.  So I've got this to work so that when you type in:
>    http://www.foo.com/directory
> it reverse proxies to http://server.bar.com:1234/directory/
>
> I'd also like to redirect so that if you try to go to:
>    http://www.foo.com
>
> it redirects to http://www.foo.com/directory.
>
> How exactly would I do a redirect command?
>     === Al
>
>
>
> ---------------------------------------------------------------------
> 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
>
>   


---------------------------------------------------------------------
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