aspose file tools*
The moose likes Tomcat and the fly likes URL redirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "URL redirect" Watch "URL redirect" New topic
Author

URL redirect

Brian Tolstrup
Greenhorn

Joined: Oct 15, 2002
Posts: 17
Hi there

I have a problem when trying to redirect an URL. So please help me if you can, because I am going crazy on this....

The platform is an IBM Apache HTTP Server V. 1.3 and an IBM Application Server V. 4.x running a Devine solution.

Now my problem is that we have two URL's how should be showing the same site.

Exampel:
We have already a site called www.a-a.com. But now we have included the URL www.aa.com to oure litle firm. So now we would like the two URL's to point to the same instance of the WAS.

I am already having this listed in my httpd.conf file:

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName www.a-a.com
CustomLog "| ......
...
...
</VirtualHost>
And that work fine - we can see the site and so on.

Now I have tryed doing like this/adding this to the httpd.conf file:
<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName aa.com
ServerAlias www.aa.com a-a.com www.a-a.com
</VirtualHost>

The total is now:

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName www.a-a.com
CustomLog "| ......
...
...
</VirtualHost>

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName aa.com
ServerAlias www.aa.com a-a.com www.a-a.com
</VirtualHost>

But this does not work !??? I can reach the default errorpage of the HTTP-server - but not get into the WAS or even the requested(redirected URL).

There is a DNS server in oure enviroment, so we do not have to change any windows HOSTS files.

I hope someone can help - and understand my english

Regards
Brian Tolstrup


Regards<br />Brian Tolstrup<br />Developer
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

so you convinced american airlines to give you their domain?

or are you hiding the real names with tokens?

Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

how about one host?

Brian Tolstrup
Greenhorn

Joined: Oct 15, 2002
Posts: 17
Hi Mike

I have tryed what you posted - and also like this:

<VirtualHost 192.168.3.10>
DocumentRoot .../site
ServerName www.aa.com
ServerAlias www.aa.com a-a.com www.a-a.com
</VirtualHost>

Nothing works.....

Do you you have any idea on what the problem might be?

Regards
brian Tolstrup
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

> There is a DNS server in oure enviroment, so we do not have to change
> any windows HOSTS files

We also have an internal DNS at work, and ocassionaly, we'll forget to update it, or it gets updated incorrectly. Is it possible that this has happened?
Brian Tolstrup
Greenhorn

Joined: Oct 15, 2002
Posts: 17
Hi Mike

I can not see how it can be a DNS problem since the request in both cases (www.a-a.com and www.aa.com) get to the server. I know that because www.a-a.com returns the site as it should do - and request on www.aa.com returns the <VirtualHost 192.168.3.10>'s special errorpage:
ErrorDocument 404 /errorWeb.html.

S� the request gets to the server and is processed - just not correct.

Any idea on what goes wrong?

Regards

Brian Tolstrup
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Can you make a small change to the error page (something noticeable) and then test again? That is: convince yourself there is no caching going on.

After that i'm out of ideas. I'd suggest apache-user list.
Brian Tolstrup
Greenhorn

Joined: Oct 15, 2002
Posts: 17
Hi Mike

A tryed to change the text in the <title> - bar. The changes was shown, therefore I am sure that that I get the specified 404 errorpage and that no caching is running.

Regards

Brian Tolstrup
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URL redirect