httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <uh...@fantomas.sk>
Subject Re: [users@httpd] Doubt or problem with redirect - Help please.
Date Mon, 30 Jan 2012 14:15:47 GMT
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@fantomas.sk ; 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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message