Hi Richard,
Thanks for the reply. Unfortunaltely it is not working.
It is getting redirected for all domains.
I put following:-
RewriteMap allowhost txt:/usr/apache2/conf/allowhost.txt
RewriteCond %{QUERY_STRING} ^(.*&)?location=https?://(.*) [NC]
RewriteCond ${allowhost:%2|NOT-FOUND} !^FOUND$
RewriteRule ^/web/redirect$ /error.html [R=301,L]
I guess the first match itself is not working. I have put loglevel as 9. I see following in rewrite log.
127.0.0.1 - - [27/Jul/2009:16:42:49 +051800] [localhost/sid#e8238][rid#155a30/initial] (2) init rewrite engine with requested uri /
127.0.0.1 - - [27/Jul/2009:16:42:49 +051800] [localhost/sid#e8238][rid#155a30/initial] (3) applying pattern '^/(.*)\.htm$' to uri '/'
127.0.0.1 - - [27/Jul/2009:16:42:49 +051800] [localhost/sid#e8238][rid#155a30/initial] (3) applying pattern '^/web/redirect$' to uri '/'
127.0.0.1 - - [27/Jul/2009:16:42:49 +051800] [localhost/sid#e8238][rid#155a30/initial] (1) pass through /
127.0.0.1 - - [27/Jul/2009:16:42:49 +051800] [localhost/sid#e8238][rid#153a28/subreq] (2) init rewrite engine with requested uri /v2/index.html
127.0.0.1 - - [27/Jul/2009:16:42:49 +051800] [localhost/sid#e8238][rid#153a28/subreq] (1) pass through /v2/index.html
127.0.0.1 - - [27/Jul/2009:16:43:27 +051800] [127.0.0.1/sid#e8238][rid#15fa58/initial] (2) init rewrite engine with requested uri /error.html
127.0.0.1 - - [27/Jul/2009:16:43:27 +051800] [127.0.0.1/sid#e8238][rid#15fa58/initial] (3) applying pattern '^/(.*)\.htm$' to uri '/error.html'
127.0.0.1 - - [27/Jul/2009:16:43:27 +051800] [127.0.0.1/sid#e8238][rid#15fa58/initial] (3) applying pattern '^/web/redir$' to uri '/error.html'
127.0.0.1 - - [27/Jul/2009:16:43:27 +051800] [127.0.0.1/sid#e8238][rid#15fa58/initial] (1) pass through /error.html
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (2) init rewrite engine with requested uri /Home.htm
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (3) applying pattern '^/(.*)\.htm$' to uri '/Home.htm'
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (4) RewriteCond: input='/Home.htm' pattern='!^/web/' => matched
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (2) rewrite /Home.htm -> /web/Home.htm
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (2) explicitly forcing redirect with
http://localhost/web/Home.htm
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (3) applying pattern '^/web/redirect$' to uri 'http://localhost/web/Home.htm'
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (1) escaping
http://localhost/web/Home.htm for redirect
127.0.0.1 - - [27/Jul/2009:16:45:07 +051800] [localhost/sid#e8238][rid#155a30/initial] (1) redirect to
http://localhost/web/Home.htm [REDIRECT/302]