Re: Doubt or problem with redirect - Help please.

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

 



On 25.01.12 19:03, Mathijs wrote:
Some possible solutions to this, assuming www.someaddress.com has a
virtualhost:

Simplest way is with a redirect:
<VirtualHost *:80>

ServerName www.someaddress.com
Redirect / http://www.otheraddres.com?mode=1

</VirtualHost>

RedirectMatch /.* http://www.otheraddres.com?mode=1

would be safer - your example redirects http://www.someaddress.com/blah to http://www.otheraddres.com?mode=1blah

- Redirect replaces strings.

Instead of using ProxyPass you can use mod_rewrite as well:
<VirtualHost *:80>

ServerName www.someaddress.com
RewriteRule ^.*$  http://www.otheraddres.com?mode=1 [P]

</VirtualHost>

This is just the same as the RedirectMatch above, just using different module (I think it's less effective).

--
Matus UHLAR - fantomas, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux IS user friendly, it's just selective who its friends are...

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