Bad Search Engine URLs.
As I learned in the last session I attended today, this site has bad search engine URLs. For instance, I used to have my entry page (home.jsp) defined as:
<% response.sendRedirect("page/rd"); %>
The problem with this is that the search engine sees the redirect and goes, uh oh, a redirect - that's bad, and may fail to index your site. Check out what a search engine sees via Rex Swain's HTTP Viewer. So I changed it to use a little JSTL:
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<c:import url="http://www.raibledesigns.com/page/rd"/>
I've found this to be a little better as this site shows up as http://www.raibledesigns.com/home.jsp rather than http://www.raibledesigns.com/page/rd. However, it still doesn't seem to work well with the HTTP Viewer I referred to above. When I type http://www.raibledesigns.com into it, Tomcat returns an HTTP 302 error saying "this page has temporarily moved to http://.../home.jsp - so I think Tomcat might need to work on it's <welcome-file-list> to just forward directly to the page. If anyone has any other solutions, please let me know.
Pop Quiz: What's the easiest way to get "http://www.raibledesigns.com" into my c:import tag? request.getSchema() + request.getServerName?
Posted by Michael Jack on November 03, 2003 at 12:56 AM MST #