• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic