Hmm.. Seems not to be work for me.... The target is a http://www.siteA.de/index.jsp?WERWERWERWERWER redirect to http://www.siteB.de/index.jsp?WERWERWERWERWER I download the package, unzip and put the new content to a new, empty docBase folder. I edit my ROOT.xml in SiteA point to this new folder and create an empty web.xml that contains only <filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
But where I have to define, what is the target of the redirect?
My Tomcat:
[tomcat-base]/conf/Catalina/www.siteA.de/ROOT.xml (Context docBase point to
D:\Inetpub\SiteA)
[tomcat-base]/conf/Catalina/www.siteB.de/ROOT.xml (Context docBase point to
D:\Inetpub\SiteA)
[tomcat-base]/conf/Catalina/www.siteC.de/ROOT.xml (Context docBase point to
D:\Inetpub\SiteA)
Same DocBase because it is a CMS with the functionality to show different
content for different domains.
Server.xml:
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="443" address="xxx.xxx.xxx.209" addressminSpareThreads="5"
maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="D:/Keystore/siteA.kdb" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="443" address="xxx.xxx.xxx.210" addressminSpareThreads="5"
maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="D:/Keystore/siteB.kdb" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>
<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="443" address="xxx.xxx.xxx.211" addressminSpareThreads="5"
maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="D:/Keystore/www_siteC.kdb" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>
If this is a very bad configuration, I am open for any better suggestions of
you...
Greetings
Alexander Diedler
-----Ursprüngliche Nachricht-----
Von: Pid [mailto:[email protected]]
Gesendet: Montag, 27. April 2009 11:11
An: Tomcat Users List
Betreff: Re: Permanent Redirect?
Alexander Diedler wrote:
> Hello everybody,
>
> I have a question to implement a permanent redirect for an old domain to
> a new domain on the Tomcat 6.0.16 Server.
>
> It is definied in the server.xml as it own connector (for SSL) and now
> we want, that if we fill-in www.websiteA.de <http://www.websiteA.de> we
> will be redirected to www.websiteB.de <http://www.websiteB.de>
> automatically.
A small webapp deployed in websiteA.de/ROOT that contains a servlet
Filter which is coded to issue an appropriate redirect to the new URL.
You could avoid rolling your own and try: tuckey.org/urlrewrite/
p
> Greetings
>
> Alexander
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
smime.p7s
Description: S/MIME cryptographic signature
