Setting up redirects for Tomcat server

I am having departments want their old links back so I am creating meta redirects but this is leaving folders that is adding to confusion.

I gave our Server Admin the information on the and he was looking it over.

What other options are there and how can he put a simple redirect on the server for the four sites I have that want redirects?

Note: This topic was created from a reply on the How do I redirect the URLs from my old site to the new site? topic.

Hi Debbie,

For Tomcat server redirects, the Tuckey UrlRewriteFilter really will be your best bet. The tool is being used successfully by a few existing customers already.

The steps to configure this tool are pretty straightforward, and can be found on the Tuckey site:

However, a few notes:

If you installed your DTS Tomcat using the installer included with CM1, all filesystem paths in the UrlRewriteFilter instructions above either begin at the Tomcat root, which is:

[dts_ root]/Deployment/Server/

Or your site’s publish root, which is:

[dts_ root]/Deployment/Server/[my_site_apps]/ROOT

(If you installed and configured Tomcat manually, the “Server” folder I’m referencing will equate to the Tomcat root installation folder in your instance.)

Additionally, the instructions recommend that you deploy their configuration files and edit the web.xml in your site’s WEB-INF folder. I would actually avoid doing this, as republishing your site can overwrite these files or undo these changes.

My recommendation would be to instead add the “urlrewritefilter-4.0.3.jar” file to the Tomcat’s root “lib” folder at:

[dts_ root]/Deployment/Server/lib

And make the Filter additions in their instructions to the particular web.xml located at:

[dts_ root]/Deployment/Server/conf

The “urlrewrite.xml” can be added to your site’s root folder without any issues, however:

[dts_ root]/Deployment/Server/[my_site_apps]/ROOT

Note that Tomcat’s main log file, catalina.log (which is located at [dts _root]\Deployment\Server\logs), is essential when it comes to troubleshooting any issues that may arise.

Please let me know if your server team has any issues or questions about setting this up.

What if the Adminstrator does not want to use this method - is there another?

Debbie, this really is your best option for server level redirects. The other option would be to create index pages with meta refresh redirects on the server’s file system where you want the redirects to be triggered from, but it does not sound like this is what you’re looking for.

True, the folders existing confuses the users. I’ll pass this to my server admin and thank you :slight_smile: (I know he would ask so I wanted to cover all of my bases).

No problem, Debbie. Let me know if your server admin has any trouble setting this up; I’m happy to help.

It should also be noted, for anyone considering the meta refresh over a server redirect, that the meta refresh hurts SEO. Most of the big indexers/crawlers will penalize a page rank if a meta refresh is used because it is a common spam technique. It used to be quite popular to set up a page with a bunch of keywords and a meaningful title on it so the crawlers would rank it high, but then use a meta refresh to push the user to the page they want them to go to when they would visit.

A server redirect is a search crawler friendly way to direct users to a new link. The redirect rule passes a server response to the page visitor, which indicates if it’s temporary, permanent, or for other use. In the case of a crawler, it interprets the redirect to understand why it’s there and ranks the page accordingly.