1
I need to do a permanent directing via Servlet in java, with the code below:
Here it directs with the status 301
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location", "https://google.com");
Here it directs with the status 200
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location", "https://www.google.com");
Does anyone know why you don’t behave the same way? I’m having problems directing to other domains, where they always get status 200.