From: "David Evans" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <user@struts.apache.org> Sent: Tuesday, May 09, 2006 7:53 PM Subject: Re: URL needs www appended
> if you are running on apache, you can use mod_rewrite to fix this, by > including a rewrite rule, something like: > > RewriteEngine on > RewriteCond %{HTTP_HOST} !^www\.domainname\.com$ [NC] > RewriteRule ^(.*)$ http://www.domainname.com$1 [R=301,L] > > > dave > Definitely, you need to configure your web container to accept http://domainname.com as well as http://www.domainname.com. Configuring throu this way seems more easy and transparent - also no code. You need to refer to your container documentation for that. Remember that embeded web cantainer and independent web container ned different configurations Thomas Joseph > > I have a struts site in which all views are called from the action. > > Problem I encountered, is as follows: When users search for my site in > > the search field area, the site shows up, but when the user click the > > link the "www" is not there. Google sees my site as http://sitename.com > > <http://sitename.com/> . > > > > > > > > This causes huge problems for me, as I have a site certificate that is > > linked to www.sitename.com <http://www.sitename.com/> . I thought about > > just using some type of index.jsp page and redirecting them, but then > > the bots have trouble indexing my site. The site name is > > [http://www.theuniquepear.com]. There is also the problem of a user > > putting in http://theuniquepear.com <http://theuniquepear.com/> in the > > browser bar. What happens is they get a bad or no certificate with a > > popup. Not good. > > > > > > If this was a model1 site, it would be no problem using a full url page > > to page but it is not. I have extended the processor, but do not see > > where I can add this either. Someone also mentioned a filter, but I > > could not find any working examples of how this would work. > > > > > > > > Does anyone have any ideas that may assist me in this dilemma? > > > > > > > > Sincerely > > > > Scott > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]