DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
Using nice URL that describe the content of the site will not only improve your ranking but also look more appealling to the users on a SERP (search engine result page). In our case a common URL looks like that:
http://isport.eu/en/premier-league/liverpool-fc/news-19-2008-0.html![]()
where /en is the language, /premier-league is the currently selected league, /liverpool-fc is the club the page is about, /news are on the page, 19-2008 is the week and 0 is the current page.
...
| Code Block |
|---|
protected WebResponse newWebResponse(final WebRequest webRequest, final HttpServletResponse httpServletResponse){
return new ServletWebResponse((ServletWebRequest)webRequest, httpServletResponse) {
@Override
public String encodeURL(CharSequence url) {
final String agent = webRequest.getHeader("User-Agent"return isRobot(webRequest) ? url.toString() : super.encodeURL(url);
}
return isAgent(agent @Override
public String encodeRedirectURL(CharSequence url) {
return isRobot(webRequest) ? url.toString() : super.encodeURLencodeRedirectURL(url);
}
private boolean isRobot(WebRequest request) @Override{
public final String encodeRedirectURL(CharSequence url) {agent = webRequest.getHeader("User-Agent");
return encodeURL(url) /* use 'agent' to decide whether this is a bot */;
}
};
}
|
Wicket 1.4
| Code Block |
|---|
@Override
protected WebResponse newWebResponse(final HttpServletResponse servletResponse) {
return new BufferedWebResponse(servletResponse) {
@Override
public CharSequence encodeURL(final CharSequence url) {
final String agent = ((WebRequest) RequestCycle.get().getRequest()).getHttpServletRequest().getHeader("User-Agent");
return isAgent(agent) ? url : super.encodeURL(url);
}
};
}
|
...