I have param with slash, it encodes to the UTF-8, but server return me 404 error. How to exclude slash or %2F from my last param. In my project I use only annotations.
I can't change any structure and urls, because my site is in top position and Google told me to fix this, because indexed urls return 404.
Example of urls, slash :
/ru/weather/7/Neustad%2FNord_DE
/de/weather7/Reichenbach%2FVogtland_DE
Have controller
@RequestMapping({
"/",
"/forecast/{locationRequest:.+}",
"/forecast/today/{locationRequest:.+}",
"/weather/today/{locationRequest:.+}",
"/weather/map/{locationRequest:.+}",
"/forecast/map/{locationRequest:.+}",
"/forecast/tomorrow/{locationRequest:.+}",
"/weather/tomorrow/{locationRequest:.+}",
"/weather/history1/{locationRequest:.+}",
"/weather/history3/{locationRequest:.+}",
"/forecast/3/{locationRequest:.+}",
"/weather/3/{locationRequest:.+}",
"/forecast/5/{locationRequest:.+}",
"/weather/5/{locationRequest:.+}",
"/forecast/7/{locationRequest:.+}",
"/weather/7/{locationRequest:.+}",
"/forecast/10/{locationRequest:.+}",
"/weather/10/{locationRequest:.+}",
"/forecast/14/{locationRequest:.+}",
"/weather/14/{locationRequest:./+}",
"/forecast/hour-by-hour1/{locationRequest:.+}",
"/weather/hour-by-hour1/{locationRequest:.+}",
"/forecast/hour-by-hour3/{locationRequest:.+}",
"/forecast/detailed3/{locationRequest:.+}",
"/forecast/detailed1/{locationRequest:.+}",
"/weather/detailed1/{locationRequest:.+}",
"/weather/detailed3/{locationRequest:.+}",
"/weather/hour-by-hour3/{locationRequest:.+}",
"/weather/widgets/{locationRequest:.+}",
"/weather/climate/{locationRequest:.+}"
})
public ModelAndView index(@PathVariable(value = "locationRequest") String locationRequest) {}
Also in my application.properties have
org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true
In main class also i made
System.setProperty("org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH", "true");