File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:rewrite Giving the Wrong Domain

 
Jamie Jackson
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 254
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe, there is a base tag in your page that is throwing everything out of whack.....

Oh, nevermind....
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic