Re: VirtualHost & Location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 17, 2010 at 6:02 AM, Milan Tomic <tomicmilan@xxxxxxxxx> wrote:
>
> I have also tried LocationMatch:
>
> <LocationMatch "/SomeUrl/[A-Za-z0-9]+">
> ProxyPass  http://www.yahoo.com/
> </LocationMatch>
>
> and
>
> <LocationMatch "/SomeUrl/.+">
> ProxyPass  http://www.yahoo.com/
> </LocationMatch>
>
> but without success. I need to match if there is anything behind slash /
>
> TIA
>
>
>
>
> ----- Original Message ----
> From: Milan Tomic <tomicmilan@xxxxxxxxx>
> To: users@xxxxxxxxxxxxxxxx
> Sent: Wed, March 17, 2010 12:13:52 AM
> Subject: Re:  VirtualHost & Location
>
>
>
>
>> Why are you using ProxyPass ? You can use Redirect if don't want to mask
>> that content is coming from your server (and of course save your bandwidth).
>
> I have tried this:
>
> <VirtualHost *:8080>
> <Location /SomeUrl/>
> ProxyPass  http://localhost:8082/SomeUrl/
> </Location>
>
> Redirect /SomeUrl/index.html http://www.google.com
> Redirect /SomeUrl http://www.google.com
> Redirect /SomeUrl/ http://www.google.com
>
> </VirtualHost>
>
> but only second Redirect directive works fine. It seems that others are overriden by ProxyPass? What should I do now? :(
>
> TIA
>
>
>
>
>
> ---------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>
>
>
> ---------------------------------------------------------------------
> 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@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

Use mod_rewrite.

<VirtualHost *:8080>
RewriteEngine On
RewriteRule ^/SomeUrl/(.*)$ http://www.google.com/$1 [R=301]
</VirtualHost>

-- 
Nilesh Govindarajan
Site & Server Administrator
www.itech7.com

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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux