1

My current setup has two virtual-servers, my-server redirects to the domain with www. prefix.

<virtual-server network-listeners="my-nlistener" id="my-server" sso-cookie-http-only="false" hosts="mydomain.com">
  <property name="redirect_1" value="from=/my-page.jsp url-prefix=http://www.mydomain.com/my-page.jsp"/>
  <property name="redirect_2" value="from=/about.jsp url-prefix=http://www.mydomain.com/about.jsp"/>      
</virtual-server>
<virtual-server network-listeners="my-nlistener" id="my-new-server" sso-cookie-http-only="false" hosts="www.mydomain.com">      
</virtual-server>

Unfortunately, for SEO compliance, I need to do 301 redirects and not 302

How do I force 301 redirects in GlassFish like in Apache? Or is it a better practice to keep only one virtual-server and have multiple hosts as such : <virtual-server id="my-new-server" hosts="www.mydomain.com, domain.com">.

I would love to avoid creating a Spring application to do 301 redirects for the specified pages.

0

You must log in to answer this question.

Browse other questions tagged .