Hi guys,

I am trying to permanently redirect http://xyz.com to
http://www.xyz.com, which is hosted on Apache2 + Tomcat 5.5.9 with
mod_jk. I am trying to use .htaccess file to do so. So far my efforts
have been unsuccessful!

It looks like one the request is handed over to mod_jk before it gets
handled by mod_rewrite by Apache. What could I be doing wrong? Please
advise.

Thanks,
Shashi

My .htaccess file is as follows, which I've placed in
tomcat/webapps/xyz directory
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^xyz.com [nc]
rewriterule ^(.*)$ http://www.xyz.com/$1 [r=301,nc]

relevant portion of httpd.conf file...
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule jk_module modules/mod_jk.so
JkWorkersFile /etc/httpd/conf/workers.properties
JkLogFile /etc/httpd/logs/mod_jk.log
JkLogLevel error
JkLogStampFormat "[%a %b %d %J:%M:%S %Y]"
JkMount /* ajp13

Relevant portion of tomcat/conf/server.xml file...
<Host name="xyz.com" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
    <Alias>www.xyz.com</Alias>
    <Context path="" docBase="xyz">
    </Context>
</Host>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to