Hi,
Thank you so much for your quick reply.
i run the same in localhost and it was working fine with the below
condition
<condition name="host" operator="notequal">^$</condition>
when we enter some thing in the host and then checks the condition
like
http header!= " " and so the condition is always became TRUE.
here is a log-
[10/5/09 9:20:47:092 EDT] 0000002e WebApp A SRVE0180I:
[Servlet.LOG]:
org.tuckey.web.filters.urlrewrite.RuleBase DEBUG: matched "from"
[10/5/09 9:20:47:092 EDT] 0000002e WebApp A SRVE0180I:
[Servlet.LOG]:
org.tuckey.web.filters.urlrewrite.Condition DEBUG: evaluating
"localhost:9080" against localhost:9080
[10/5/09 9:20:47:108 EDT] 0000002e WebApp A SRVE0180I:
[Servlet.LOG]:
org.tuckey.web.filters.urlrewrite.Condition DEBUG: evaluating
"localhost:9080" against ^$
[10/5/09 9:20:47:108 EDT] 0000002e WebApp A SRVE0180I:
[Servlet.LOG]:
org.tuckey.web.filters.urlrewrite.Condition DEBUG: not equal operator
in use
[10/5/09 9:20:47:108 EDT] 0000002e WebApp A SRVE0180I:
[Servlet.LOG]:
org.tuckey.web.filters.urlrewrite.RuleBase DEBUG: conditions match
[10/5/09 9:20:47:123 EDT] 0000002e WebApp A SRVE0180I:
[Servlet.LOG]:
org.tuckey.web.filters.urlrewrite.RuleExecutionOutput DEBUG: needs to
be permanentely redirected to
http://www.example.com/Applcationcontext/
[10/5/09 9:20:47:483 EDT] 0000002e WebApp A SRVE0180I:
[Servlet.LOG]:
org.tuckey.web.filters.urlrewrite.UrlRewriter DEBUG: rule is last
---
what i understood is , it is not a harm if we have this condition .
am i correct ?
please let me know is it a harm or not if we have this condition in
the rule. if so the below 2 rules are correct to achive(to redirect
www
and non-www url to www).
because that condition is already existed in the application and we
are just following. coming to improve, as you said this is not at all
required because always true. correct ?
You comments are so appreciated AKS.
Regards,
Mahesh.
On Nov 2, 5:07 am, Avlesh Singh <
avl...@gmail.com> wrote:
> > Thanks AKR
>
> I tried really hard, but failed to understand the acronym!
>
> but the below rules were correct or not to achieve the same(to redirect www> and non-www url to www).
> > <condition name="host" operator="equal">
www.example.org</condition>
> > <condition name="host" operator="notequal">^$</condition>
> > ...
>
> I don't think you would achieve what you want with these conditions. What
> makes you think that <condition name="host"
> operator="notequal">^$</condition> would NOT match anything under the sun?
> It is rule which essentially says "*when the host is NOT equal to an empty
> string*". Read the previous statement once more, and you would realize that
> *it is true for all requests *(because every request has a host header). As
> I earlier said, multiple <condition>'s are AND'ed with other, so in effect
> your rule only applies to requests fromwww.example.orgdomain.
> Did I make it clear?
>
> Please let me know ASAP.
>
> Your urgency is understood and respected. Queries on this mailing list don't
> go unanswered. Don't get impatient.
>
> Cheers
> Avlesh
>
> On Mon, Nov 2, 2009 at 3:13 PM, mahesh
> <
hariprasad.kanamarlap...@gmail.com>wrote:
>
>
>
> > Hi,
>
> > Thanks AKR, but the below rules were correct or not to achieve the
> > same(to redirect www and non-www url to www).
>
> > <rule>
> > <name>Domain
Remappingwww.example.com</name>
> > > > >
http://example.org/orhttp://www.example.org/thenithas to