Re: Site wide 301 redirect to https from http

2014-10-28 Thread Thiago H de Paula Figueiredo
On Tue, 28 Oct 2014 17:30:22 -0200, George Christman wrote: nvm I got it, thanks guys. Also, is looking at the port the efficient way of doing this? if (port == 8080) { Instead of hardwiring the port number, you should check the SymbolConstants.HOSTPORT_SECURE or HOSTPORT symbol v

Re: Site wide 301 redirect to https from http

2014-10-28 Thread George Christman
nvm I got it, thanks guys. Also, is looking at the port the efficient way of doing this? @Override public boolean dispatch(Request request, final Response response) throws IOException { int port = request.getLocalPort(); PageRenderRequestParameters parameters = linkEncoder.dec

Re: Site wide 301 redirect to https from http

2014-10-28 Thread George Christman
Hi Kalle, would you still be setting the status header in the dispatcher? On Tue, Oct 28, 2014 at 2:30 PM, Kalle Korhonen wrote: > The problem is that the status header is rewritten - sendRedirect() > implicitly sets 302 by the spec. Set the headers yourself and flush to > commit: > > > servletR

Re: Site wide 301 redirect to https from http

2014-10-28 Thread Kalle Korhonen
The problem is that the status header is rewritten - sendRedirect() implicitly sets 302 by the spec. Set the headers yourself and flush to commit: servletResponse.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); servletResponse.setHeader("Location", servletResponse.encodeRedire

Re: Site wide 301 redirect to https from http

2014-10-28 Thread George Christman
I found componentRequestHandler in some tapestry code and when I removed it, no page. I guess I just needed to return false ;) Yup the code is definitely running, I can remove Secure_Page and the page redirects without issue, however no matter what I setStatus too, it continues to provide a 302 re

Re: Site wide 301 redirect to https from http

2014-10-28 Thread Thiago H de Paula Figueiredo
On Tue, 28 Oct 2014 15:11:13 -0200, George Christman wrote: Hi Thiago, Hi! I'm assuming you mean something like this, but I'm not seeing the 301 response. Could you take a look and see if you can spot what I'm doing wrong. Below is the response as well. Thank you. Are you sure your code

Re: Site wide 301 redirect to https from http

2014-10-28 Thread George Christman
Hi Thiago, I'm assuming you mean something like this, but I'm not seeing the 301 response. Could you take a look and see if you can spot what I'm doing wrong. Below is the response as well. Thank you. public class AccessController implements Dispatcher { @Override public boolean dispatch(Req

Re: Site wide 301 redirect to https from http

2014-10-28 Thread Thiago H de Paula Figueiredo
On Tue, 28 Oct 2014 04:30:45 -0200, George Christman wrote: it appears as if the redirects are happening automatically without a 301. Does anybody know how I can accomplish this task? When I move pages, I generally just use something like this. Link link = linkSource.createPageRenderLinkWit

Re: Site wide 301 redirect to https from http

2014-10-28 Thread Chris Mylonas
Do u have httpd in front of? I just found some form stuff to work on for redirects, on phone now but can suss more later/2moz Cm On 28/10/2014 5:32 pm, "George Christman" wrote: > Hi guys, I'm in the process of migrating my entire site to https from http. > I need to do this with extreme cautio

Site wide 301 redirect to https from http

2014-10-27 Thread George Christman
Hi guys, I'm in the process of migrating my entire site to https from http. I need to do this with extreme caution or I risk losing my search rank. Google recommends 301 redirects for every page being migrated, however when securing the app like so, public void contributeMetaDataLocator(MappedConf