tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RAVIRAJ SHAH <me.raviraj...@gmail.com>
Subject Re: non www to www URL Rewrite
Date Wed, 08 Nov 2017 13:30:22 GMT
Anybody please help

On Tue, Nov 7, 2017, 12:00 RAVIRAJ SHAH <me.raviraj007@gmail.com> wrote:

> Dear All,
>
> Kindly request you to help to resolve this issue
>
> Problem Statement :
> we want to redirect non-www URL to www URL only
>
> Current setup :
>
> Defined rewrite valve in server.xml as below
>
>
> <Host name="thevgr.com" appBase="webapps" unpackWARs="true" autoDeploy=
> "true">
>
>
>
>     <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
>
>
>
> </Host>
>
> Created rewrite.config file in ../conf/Catalina/<Hostname>/
>
>
> *RewriteCond %{HTTP_HOST} !^(.*)\.yourdomain\.com$ [NC] RewriteRule ^(.*)$
> http://www.yourdomain.com <http://www.yourdomain.com>/$1 [R=301,L]*
>
> *kindly do needful*
>
> Thanks & Regards,
> Raviraj Shah
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message