jboss7.x - how to redirect domian.com to www.domain.com in jboss 7.1.1 server -
in website ssl www.domain.com. open using worked fine, when use domain.com show security exception how resolve that
i used url rewrite in standalone.xml file below not worked me
<virtual-server name="default-host" enable-welcome-root="false"> <alias name="domain.com"/> <alias name="www.domain.com"/> <rewrite pattern="^(.*)$" substitution="https://$1" flags="r=301,l"> <condition test="%{http_host}" pattern="^www\.(.+)$" flags="nc"/> </rewrite> </virtual-server>
please let me know if did wrong?
its worked fine after changes
<rewrite pattern="^(.*)$" substitution="https://www.domain.com$1" flags="r=301,l"> <condition test="%{http_host}" pattern="!^www\.domain\.com$" flags="nc"/> </rewrite>
Comments
Post a Comment