掲示板
Liferay 301 redirect
Hello guys,
I'm trying to redirect to a different page using the following code
But this uses a temporary 302 redirection. I need the liferay function sendRedirect to use the permanent 301 redirection. I tried the following but it's not working as well :
Any ideas ? I'm using Liferay 6.1 and Tomcat 7.
Thanks.
I'm trying to redirect to a different page using the following code
response.sendRedirect(newURL);
But this uses a temporary 302 redirection. I need the liferay function sendRedirect to use the permanent 301 redirection. I tried the following but it's not working as well :
response.setProperty(ResourceResponse.HTTP_STATUS_CODE, Integer.toString(301));
response.sendRedirect(newURL);
Any ideas ? I'm using Liferay 6.1 and Tomcat 7.
Thanks.
11年前 に sridhar iyer によって更新されました。
RE: Liferay 301 redirect (回答)
Junior Member 投稿: 57 参加年月日: 09/02/27 最新の投稿
You may try something like that
<%
response.setStatus(301);
response.setHeader( "Location", "http://www.new-url.com/" );
response.setHeader( "Connection", "close" );
%>
<%
response.setStatus(301);
response.setHeader( "Location", "http://www.new-url.com/" );
response.setHeader( "Connection", "close" );
%>
6年前 に Aravinth Kumar によって更新されました。
RE: Liferay 301 redirect
Regular Member 投稿: 152 参加年月日: 13/06/26 最新の投稿
Hi,
I am using liferay 7. Is there any other way to do this in recent versions ?
Thanks in Advance.
Regards,
Aravinth
I am using liferay 7. Is there any other way to do this in recent versions ?
Thanks in Advance.
Regards,
Aravinth