Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Domain Remapping from .org to .com
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  10 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mahesh  
View profile  
 More options Oct 30, 9:37 am
From: mahesh <hariprasad.kanamarlap...@gmail.com>
Date: Fri, 30 Oct 2009 06:37:24 -0700 (PDT)
Local: Fri, Oct 30 2009 9:37 am
Subject: Domain Remapping from .org to .com
Hi,

when i type

http://example.org/  or http://www.example.org/ then it has to
redirect to http://www.example.com/

I written the below  rule in urlrewrite.xml

<rule>
    <name>Domain Remapping example.org</name>
    <condition name="host" operator="equal">example.org</condition>
    <condition name="host" operator="notequal">^$</condition>
    <from>^/(.*)</from>
    <to last="true" type="permanent-redirect">http://www.example.com/
$1</to>
  </rule>

  Could you please let me know whether the above rule will work for
domain remapping.

Thanks,
Mahesh.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mahesh  
View profile  
 More options Oct 30, 3:13 pm
From: mahesh <hariprasad.kanamarlap...@gmail.com>
Date: Fri, 30 Oct 2009 12:13:37 -0700 (PDT)
Local: Fri, Oct 30 2009 3:13 pm
Subject: Re: Domain Remapping from .org to .com
hi,

Basically i need to redirect www and non-www url to www
e.g..
http://www.example.org/
http://example.org/

To     http://www.example.com/

Please advice me that this urlrewrite.xml rule is sufficient.

 <rule>
     <name>Domain Remapping example.org</name>
     <condition name="host" operator="equal">example.org</condition>
     <condition name="host" operator="notequal">^$</condition>
     <from>^/(.*)</from>
     <to last="true" type="permanent-redirect">http://www.example.com/
$1</to>
  </rule>

Please help me out as soon as possible as i can't test it in local
host this scenario.
Regards,
Mahesh

On Oct 30, 9:37 am, mahesh <hariprasad.kanamarlap...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Avlesh Singh  
View profile  
 More options Nov 1, 12:00 am
From: Avlesh Singh <avl...@gmail.com>
Date: Sun, 1 Nov 2009 09:30:59 +0530
Local: Sun, Nov 1 2009 12:00 am
Subject: Re: Domain Remapping from .org to .com

Multiple condition tags are "and'ed" while evaluating the rule. For your
use-case, the underneath should suffice
<rule>
  <condition name="host" operator="equal" next="or">www.example.org
</condition>
  <condition name="host" operator="equal">example.org</condition>
  <from>(.*)</from>
  <to last="true" type="permanent-redirect">http://www.example.com$1</to>
</rule>

Cheers
Avlesh

On Sat, Oct 31, 2009 at 12:43 AM, mahesh <hariprasad.kanamarlap...@gmail.com


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mahesh  
View profile  
 More options Nov 2, 4:43 am
From: mahesh <hariprasad.kanamarlap...@gmail.com>
Date: Mon, 2 Nov 2009 01:43:55 -0800 (PST)
Local: Mon, Nov 2 2009 4:43 am
Subject: Re: Domain Remapping from .org to .com
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 Remapping www.example.com</name>
    <condition name="host" operator="equal">www.example.org</
condition>
    <condition name="host" operator="notequal">^$</condition>
    <from>^/(.*)</from>
    <to last="true" type="permanent-redirect">http://www.example.com/
$1</to>
  </rule>

  <rule>
    <name>Domain Remapping example.com</name>
    <condition name="host" operator="equal">example.org</condition>
    <condition name="host" operator="notequal">^$</condition>
    <from>^/(.*)</from>
    <to last="true" type="permanent-redirect">http://www.example.com/
$1</to>
  </rule>

Please let me know ASAP.

Regards,
Mahesh

On Oct 31, 11:00 pm, Avlesh Singh <avl...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Avlesh Singh  
View profile  
 More options Nov 2, 5:07 am
From: Avlesh Singh <avl...@gmail.com>
Date: Mon, 2 Nov 2009 15:37:24 +0530
Local: Mon, Nov 2 2009 5:07 am
Subject: Re: Domain Remapping from .org to .com

> 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 from www.example.org domain.
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:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mahesh  
View profile  
 More options Nov 2, 5:49 am
From: mahesh <hariprasad.kanamarlap...@gmail.com>
Date: Mon, 2 Nov 2009 02:49:34 -0800 (PST)
Local: Mon, Nov 2 2009 5:49 am
Subject: Re: Domain Remapping from .org to .com
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:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Avlesh Singh  
View profile  
 More options Nov 2, 5:55 am
From: Avlesh Singh <avl...@gmail.com>
Date: Mon, 2 Nov 2009 16:25:36 +0530
Local: Mon, Nov 2 2009 5:55 am
Subject: Re: Domain Remapping from .org to .com

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

Yes, the condition (<condition name="host"
operator="notequal">^$</condition>) is always true and hence not required.
It should not matter whether you run your application in localhost or a
named domain.

Cheers
Avlesh

On Mon, Nov 2, 2009 at 4:19 PM, mahesh
<hariprasad.kanamarlap...@gmail.com>wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mahesh  
View profile  
 More options Nov 2, 6:11 am
From: mahesh <hariprasad.kanamarlap...@gmail.com>
Date: Mon, 2 Nov 2009 03:11:57 -0800 (PST)
Local: Mon, Nov 2 2009 6:11 am
Subject: Re: Domain Remapping from .org to .com
Hi,

Thanks a lot AKS.

so will these rules suffice to archive redirect www and non-www url to
www.

<rule>
    <name>Domain Remapping www.example.com</name>
    <condition name="host" operator="equal">www.example.org</
condition>
    <condition name="host" operator="notequal">^$</condition>
    <from>^/(.*)</from>
    <to last="true" type="permanent-redirect">http://www.example.com/
$1</to>
  </rule>

  <rule>
    <name>Domain Remapping example.com</name>
    <condition name="host" operator="equal">example.org</condition>
    <condition name="host" operator="notequal">^$</condition>
    <from>^/(.*)</from>
    <to last="true" type="permanent-redirect">http://www.example.com/
$1</to>
  </rule>

Please let me know. I think i am asking so many questions. sorry for
that AKS as i can't test it production scenarios in the localhost for
urlrewrite . Once again thanks for your comments.

Regards,
Mahesh.

On Nov 2, 5:55 am, Avlesh Singh <avl...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Avlesh Singh  
View profile  
 More options Nov 2, 6:29 am
From: Avlesh Singh <avl...@gmail.com>
Date: Mon, 2 Nov 2009 16:59:42 +0530
Local: Mon, Nov 2 2009 6:29 am
Subject: Re: Domain Remapping from .org to .com

> so will these rules suffice to archive redirect www and non-www url to
> www.

<rule>

To keep the answer simple - YES. These rules would work without glitches for
you.

But, why don't you consider the one that I sent in my first response. It is
a lot more cleaner and accurate. I am pasting it once more for your
reference -
<rule>
    <condition name="host" operator="equal" next="or">www.example.org
</condition>
    <condition name="host" operator="equal">example.org</condition>
    <from>(.*)</from>
    <to last="true" type="permanent-redirect">http://www.example.com$1</to>
</rule>

Cheers
Avlesh

On Mon, Nov 2, 2009 at 4:41 PM, mahesh
<hariprasad.kanamarlap...@gmail.com>wrote:

...

read more »


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mahesh  
View profile  
 More options Nov 2, 11:34 am
From: mahesh <hariprasad.kanamarlap...@gmail.com>
Date: Mon, 2 Nov 2009 08:34:25 -0800 (PST)
Local: Mon, Nov 2 2009 11:34 am
Subject: Re: Domain Remapping from .org to .com
Hi,

Yes that is TRUE. what ever you proposed solution is the clean and
accurate but that is an existing code and we will take that this is an
improvement.

Thanks AKS !!!

Regards,
Mahesh.

On Nov 2, 6:29 am, Avlesh Singh <avl...@gmail.com> wrote:

...

read more »


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google