• Welcome to KonaKart Community Forum. Please login or sign up.
 

Redirect Strategy

Started by nickgk, June 04, 2008, 07:50:46 pm

Previous topic - Next topic

nickgk

Hello,

I have a static html site at http://www.susato.com and I have a konakart based site that is close to being ready for 'go-live' at http://www.susato.com/konakart.  I would like to redirect all traffic that arrives at www.susato.com to www.susato.com/konakart. I believe this can be done with an Apache redirect like this:

Redirect / http://www.susato.com/konakart

The tricky part is that I also want to redirect traffic from specific URL's like this -->

www.susato.com/susatoocarinas.html - I would like to be translated or transmorgrafied :) to:

http://www.susato.com/konakart/SelectCat.do?catId=149

This would have to be implemented to TomCat because the request is out of Apache's hands at this point.  Am I correct? Does anyone have any insight on this? How has this commonly dealt with? I would love to go live soon.

Thanks,
Nick



heidi

June 04, 2008, 08:08:43 pm #1 Last Edit: June 04, 2008, 08:10:59 pm by heidi
Hi,

How about leaving the main site as it is and redirecting just the 'jsp' and 'do' traffic:

Somewhere in httpd.conf
JkMount /*.jsp kkworker
JkMount /*.do kkworker

Typically included into httpd.conf from conf.d/mod_jk.conf:
JkWorkersFile   /etc/httpd/conf/workers.properties

workers.properties:
#
# KonaKart Worker
#
worker.list=kkworker
worker.kkworker.type=ajp13
worker.kkworker.host=localhost
worker.kkworker.port=8789

...and you'll need this in your server.xml:

<!-- Define an AJP 1.3 Connector on port 8789 -->
<Connector port="8789"
            enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />


For the html files - can't you put the necessary redirects in each one as they appear to need to be different for each?

Regards,
Heidi

nickgk

Heidi,

Thank you for reply. It led me on path to a solution I am happy with. I implemented the JkMount part of your suggestion and it redirects .jsp and .do traffic as it should. But, it does not redirect the base URL of the site to the konakart engine like this:

http://www.susato.com   --> http://www.susato.com/konakart

In the process of adding your suggested JkMount directive I found out about apache mod_rewrite and added the following to my httpd.conf file.

RewriteEngine On
RedirectMatch ^/$ http://www.susato.com/konakart/
RedirectMatch ^/susatoocarinas\.html$  /konakart/SelectCat.do?catId=149


It redirects normal entries to the site and allows me to add redirects for a number of pages that have search engine prominence. Hope this helps someone else out there.

Thanks,
Nick