1

I have a jsp (test1.jsp) which has a code response.sendRedirect("xxx/jsp/test2.jsp");

when i access it with akamai url, it is redirecting to origin server.

http://akamai.domain/xxx/jsp/test1.jsp

redirects to

http://origin.domain/xxx/jsp/test2.jsp

can some one advise what has to be done to fix it?

xlecoustillier
  • 16,183
  • 14
  • 60
  • 85
user1366111
  • 21
  • 1
  • 3
  • What application server is this running under? Is origin.domain set as the default redirection target within your server? – JoshDM Jan 14 '13 at 16:06
  • we are using jboss eap 4.3 as app server and apache as webserver. can you advise what to do to set it as default redirection target? I have these settings in httpd.conf ServerName vhost.domain:80 ServerAlias akamai.domain ServerAlias origin.domain ProxyPass /contextpath balancer://cluster lbmethod=byrequests stickysession=JSESSIONID|jsessionid timeout=60 ProxyPassReverse /contextpath http://jbossip:port/contextpath ProxyPreserveHost On – user1366111 Jan 14 '13 at 16:37

1 Answers1

1

Prepend the Akamai CDN URL to the path:

String akamai_url = "http://akamai.domain/xxx/jsp/test2.jsp";

response.sendRedirect(akamai_url);
Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
  • Thank you for the reply.However issue is with the akamai configurations.We have done some changes and it got fixed. – user1366111 Jan 21 '13 at 02:03