aspose file tools*
The moose likes Struts and the fly likes html:rewrite Giving the Wrong Domain Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:rewrite Giving the Wrong Domain" Watch "html:rewrite Giving the Wrong Domain" New topic
Author

html:rewrite Giving the Wrong Domain

Jamie Jackson
Ranch Hand

Joined: Jan 11, 2005
Posts: 58
Using <html:rewrite/> in a Struts app.

When I hit the site's primary domain (www.myDomain.com), <html:rewrite/> returns the correct domain (www.myDomain.com); however, if I hit an alternate domain (e.g., myAlternateDomain.com), it still returns the primary domain. I realize this has something to do with my Apache Virtual Hosts (see snippet below), but I don't know how to fix it.

<VirtualHost *>
ServerName www.myDomain.com
ServerAlias myDomain.com
ServerAlias myAlternateDomain.com
ServerAlias myAlternateDomain2.com
...
</VirtualHost>

Suggestions?

Thanks,
Jamie
Jamie Jackson
Ranch Hand

Joined: Jan 11, 2005
Posts: 58
I see that nobody likes my sad, lonely post. Can anyone suggest a better place to ask it? I don't know if it's more of a Struts question or an Apache question.

Thanks,
Jamie
Jamie Jackson
Ranch Hand

Joined: Jan 11, 2005
Posts: 58
Nevermind. Some mean person had put a base href tag in the header.

I deleted it violently. It works now, of course.

Thanks,
Jamie
Kerry Wilson
Ranch Hand

Joined: Oct 29, 2003
Posts: 254
Maybe, there is a base tag in your page that is throwing everything out of whack.....

Oh, nevermind....


http://www.goodercode.com
SCJP 1.4
 
 
subject: html:rewrite Giving the Wrong Domain