1 Reply Latest reply on Feb 8, 2009 12:25 PM by Adrien Adrien

    How to redirect domain to new domain?

    Adrien Adrien Apprentice

      hi,
      I ve 2 domains http://www.lorizon.fr and http://www.lorizon.com (new domain)

      This is the same web site.

      I see in forums to not have duplicate content, i have to redirect http://www.lorizon.fr -->http://www.lorizon.com
      How can i do it? There is someone with an example?
      i m using jboss 4.2.2.

      Thanks

        • 1. Re: How to redirect domain to new domain?
          Adrien Adrien Apprentice

          Hi,
          I think i have found but not completely:
          In /conf/
          I write this properties file : rewrite.properties

          RewriteCond %{HTTP_HOST} ^www.a.fr [NC]
          RewriteRule ^(.*) http://www.a.com/$1 [L,R=301]

          In server.xml i put just after engine:
          <Valve className="org.jboss.web.rewrite.RewriteValve" />


          But with this the server redirect to http://www.a.com// instead of http://www.a.com/ (with only 1 / at the end)
          If my rule is
          RewriteRule ^(.*) http://www.a.com$1 [L,R=301] (remove / before $1)
          the url is good.
          So all exemple i found on internet
          rule was
          RewriteRule ^(.*) http://www.a.com/$1 [L,R=301]
          and not
          RewriteRule ^(.*) http://www.a.com$1 [L,R=301]

          It s seem i have not the standard behaviour. There is someone who has this strange behaviour? So what is the risk i f use "my" rule?

          Thanks
          I use Jboss4.2.2/richfaces/jsf(sun)