Posted By

jonhenshaw on 04/16/07


Tagged

redirect java 301 jsb


Versions (?)

JSP (Java) Redirect


 / Published in: Java
 

This redirects visitors to a new URL using a 301 redirect. Using a 301 redirect is the safest way to let search engines like Google, Yahoo!, Live and Ask know your address has changed.

  1. <%
  2. response.setStatus(301);
  3. response.setHeader( "Location", "http://www.domain.com/" );
  4. response.setHeader( "Connection", "close" );
  5. %>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: seo on November 9, 2009

Cool this will help with the optimisation of my website

You need to login to post a comment.