views:

30

answers:

2

I have site say http://info.sys.com

I want the info in the url to be replaced to knowledge.sys.com when i select knowledge tab in my website.

info.sys.com should be replaced to knowledge.sys.com when i select knowledge tab.

I use jdk 1.5 update 9 and tomcat 6.0.16

Looking forward for your reply.

A: 

Changing the URL field programmatically on the client-side will trigger the browser to refresh the page with the updated URL.

This is considered a security feature which guarantees that the URL field is always showing the address of the rendered resource.

You can use a URL Rewriting Engine on your server if you cannot host your knowledge base at knowledge.sys.com. This could be configured to handle requests to knowledge.sys.com without having to change your application file structure.

Daniel Vassallo
A: 

If you change the URL (location.href = 'http://knowledge.sys.com';), the page will be reloaded -- well, actually, the page at that address will be loaded (whether that's the same page or not will depend on your server).

There are games you can play with anchors, though (the "hash" part of the location). Check out Really Simple History for more on that.

T.J. Crowder