• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

redirection is going to infinite loop if url is not having the www domain

 
vasu mannem
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Facing strange problem in our production environment that is redirecting the url is not working if the domain is not having www in the url.

here is the example:

we have one index.html file having the switch function for redirecting the curHost to specific action class and what action class will do is getting the domain(current host) and ip address of user and then read the properties file for getting the target url based curhost.ipaddress.

here the problem is ,if we enter http://chevroletarabia.com it is not working and if we enter like http://www.chevroletarabia.com then it is working fine.

what could be the problem can any one help me on this.

sample of index.html,propertiesfile:

IP REDIRECTION Action:
code snippet of perform method:

properties file:

can you please any ne help on this

Thanks & Regards
Vasu

[Edit by Dave to add code tags]
[ December 23, 2005: Message edited by: David O'Meara ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried opening the URL without the www in a browser? If the redirection is happening on the server (eg being sent a 301 or 302 response code) you will need to take that into account in your code.
 
vasu mannem
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
it is working for http://www.chevroletarabia.com and for http://chevroletarabia.com it is not working and going to infinite loop.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic