Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 51728 invoked from network); 30 Jul 2008 19:59:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jul 2008 19:59:13 -0000 Received: (qmail 97180 invoked by uid 500); 30 Jul 2008 19:58:56 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 97159 invoked by uid 500); 30 Jul 2008 19:58:56 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 97142 invoked by uid 99); 30 Jul 2008 19:58:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 12:58:56 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=NORMAL_HTTP_TO_IP,SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [66.226.64.22] (HELO pro21.abac.com) (66.226.64.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jul 2008 19:57:59 +0000 Received: from [192.168.168.8] (c-66-31-40-155.hsd1.ma.comcast.net [66.31.40.155]) (authenticated bits=0) by pro21.abac.com (8.14.1/8.14.1) with ESMTP id m6UJwJnc042588 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 30 Jul 2008 12:58:21 -0700 (PDT) (envelope-from kbowen@als.com) Message-Id: <9E9C7048-9264-4AF6-B788-8A24D97E9D41@als.com> From: Ken Bowen To: "Tomcat Users List" In-Reply-To: <18738052.post@talk.nabble.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v924) Subject: Re: address bar shows ip instead of domain name Date: Wed, 30 Jul 2008 15:58:19 -0400 References: <18694567.post@talk.nabble.com> <18699993.post@talk.nabble.com> <18700955.post@talk.nabble.com> <18713361.post@talk.nabble.com> <1DB2B401-A3C9-4627-AEED-163C827D6925@als.com> <18719060.post@talk.nabble.com> <18738052.post@talk.nabble.com> X-Mailer: Apple Mail (2.924) X-Spam-Score: 1.494 (NORMAL_HTTP_TO_IP,URIBL_SBL) X-Virus-Checked: Checked by ClamAV on apache.org If you mean: type http://mydomain.com and get to 00.00.00.00:/, you must register mydomain.com in the DNS with some ISP. If you want to get rid of the :8080, you must configure Tomcat to listen on port 80 instead of 8080 (check the howTo's, or search the archives). On Jul 30, 2008, at 1:13 PM, nilanthan wrote: > > how do i map to the domain name itself.. > > When I do /mydomain.com to /mywebapp/welcome.action, it only works > if I > type this in the browser: > http://00.00.00.00:8080/mydomain.com. > then it goes to http://00.00.00.00:8080/mywebapp/welcome.action but > I have > created a record for mydomain.com to go to the ip of 00.00.00.00, > same as > above ip. > > My question is how can I map to the mydomain.com to go to http://00.00.00.00 > and based on that go to http://00.00.00.00:8080/mywebapp/welcome.action? > ? > > > nilanthan wrote: >> >> Thanks Ken for all your help! >> >> >> Ken Bowen wrote: >>> >>> In rule, map >>> >>> /mydomain.com to /mywebapp/welcome.action >>> >>> in outbound-rule, map >>> >>> /mywebapp/welcome.action to /mydomain.com >>> >>> Do that for welcome, register, and every other page. >>> >>> Depending on the rules you need, you can make some use of regular >>> expressions. >>> >>> On Jul 29, 2008, at 10:25 AM, nilanthan wrote: >>> >>>> >>>> Thanks. I have placed the files/codes in the right spots and when >>>> I do >>>> localhost:8080/mywebapp/rewrite-status I get the urlrewrite page. >>>> >>>> But what i need is when a user types in the browser >>>> www.mydomain.com, it >>>> should go to http://00.00.00.00:8080/mywebapp/welcome.action but >>>> still >>>> display http://www.mydomain.com and when I click on a link, it >>>> should take >>>> my to ex. http://00.00.00.00:8080/mywebapp/register.action but in >>>> the >>>> address bar show http://www.mydomain.com/register.action. >>>> >>>> Can you use this example for the urlrewrite and where to place the >>>> codes? >>>> >>>> Thanks. >>>> >>>> >>>> >>>> Ken Bowen wrote: >>>>> >>>>> I don't know of any tutorial -- I found the documentation gave me >>>>> enough guidance. >>>>> It's really pretty straight-forward. >>>>> Drop a filter definition like this in your web.xml: >>>>> >>>>> >>>>> UrlRewriteFilter >>>>> >>>> class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter>>>> filter-class> >>>>> >>>>> >>>>> >>>>> >>>>> UrlRewriteFilter >>>>> /* >>>>> FORWARD >>>>> REQUEST >>>>> >>>>> >>>>> Then add a file urlrewrite.xml in your WEB-INF containing >>>>> mappings in >>>>> the following spirit: >>>>> >>>>> >>>>> ^/PrivacyPolicy$ >>>>> /PrivacyPolicy.do >>>>> >>>>> >>>>> ^/PrivacyPolicy.do$ >>>>> /PrivacyPolicy >>>>> >>>>> >>>>> The describes how to map something going from the >>>>> server to the browser, >>>>> and the (inbound) describes how to map what you mapped on >>>>> output (now coming back from the browser) >>>>> back into what you need to see on input. >>>>> >>>>> If you removed the comment symbols in the element, you >>>>> get >>>>> detailed debugging ouptut. >>>>> >>>>> Hope this helps. >>>>> Ken >>>>> >>>>> On Jul 28, 2008, at 6:16 PM, nilanthan wrote: >>>>> >>>>>> >>>>>> Thanks. I have looked at that before but am a bit confused >>>>>> about the >>>>>> instructions. Is there a good tutorial for this urlrewrite? >>>>>> >>>>>> >>>>>> Ken Bowen wrote: >>>>>>> >>>>>>> Apply a rewrite filter (http://tuckey.org/urlrewrite/) to map >>>>>>> the >>>>>>> ip >>>>>>> expression to what you want. >>>>>>> >>>>>>> ken >>>>>>> >>>>>>> On Jul 28, 2008, at 5:36 PM, nilanthan wrote: >>>>>>> >>>>>>>> >>>>>>>> So what Can I do so that that domain goes to that address but >>>>>>>> shows >>>>>>>> the >>>>>>>> domain in the address bar? >>>>>>>> >>>>>>>> Yuval Perlov wrote: >>>>>>>>> >>>>>>>>> Where ever you forward, that's what the address bar shows >>>>>>>>> >>>>>>>>> >>>>>>>>> On Jul 28, 2008, at 7:45 PM, nilanthan wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> I have a website hosted on netfirms. I have a domain,exmaple, >>>>>>>>>> mydomain.com >>>>>>>>>> and it forwards to an address http:/xx.xx.xxx.xx:8080/ >>>>>>>>>> folder1/ >>>>>>>>>> welcome.action >>>>>>>>>> where xx is the ip of the server. >>>>>>>>>> >>>>>>>>>> Im runningTomcat 5.5 alone without apache. The problem is >>>>>>>>>> that >>>>>>>>>> when >>>>>>>>>> a users >>>>>>>>>> goes to www.mydomain.com, it takes them to the site but in >>>>>>>>>> the >>>>>>>>>> address bar >>>>>>>>>> it shows http:/xx.xx.xxx.xx:8080/folder1/welcome.action >>>>>>>>>> instead of >>>>>>>>>> mydomain.com. >>>>>>>>>> >>>>>>>>>> Is this an issue with DNS or something in Tomcat? I will have >>>>>>>>>> multiple sites >>>>>>>>>> running in the future so I cannot place the site folder in >>>>>>>>>> the >>>>>>>>>> ROOT >>>>>>>>>> directory. >>>>>>>>>> >>>>>>>>>> Thanks. >>>>>>>>>> -- >>>>>>>>>> View this message in context: >>>>>>>>>> http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p18694567.html >>>>>>>>>> Sent from the Tomcat - User mailing list archive at >>>>>>>>>> Nabble.com. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------------------- >>>>>>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> --------------------------------------------------------------------- >>>>>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> View this message in context: >>>>>>>> http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p18699993.html >>>>>>>> Sent from the Tomcat - User mailing list archive at Nabble.com. >>>>>>>> >>>>>>>> >>>>>>>> --------------------------------------------------------------------- >>>>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>>>> >>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p18700955.html >>>>>> Sent from the Tomcat - User mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>>>> >>>>> >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p18713361.html >>>> Sent from the Tomcat - User mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To start a new topic, e-mail: users@tomcat.apache.org >>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org >>>> For additional commands, e-mail: users-help@tomcat.apache.org >>>> >>> >>> >>> >> >> > > -- > View this message in context: http://www.nabble.com/address-bar-shows-ip-instead-of-domain-name-tp18694567p18738052.html > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org