Adding a URL rewrite to AppWorks Gateway 16.x
originally posted April 11, 2019 | 🕐️ 2 minute read
When upgrading from AppWorks Gateway 1.2.x to 16.x, you may want your users to access your configured services via the same URL as before. This article describes how to use URL rewriting to achieve this.
In AppWorks Gateway 16.x both the Gateway and the Administration Console are accessed via the root context of the Apache Tomcat installation.
This is a change from AppWorks Gateway 1.2.x, where users were taken to
https://[appworksurl]/, from where they could access the services that were configured there, for example, Tempo Box or Tempo Social.
When upgrading to 16.x, you may want to ensure that users continue to access any configured services with the URL they used prior to the upgrade.
To do this, you can use URL rewriting to perform a URL redirect to the
The following steps describe how to redirect your users from
http://host.opentext.com/content by downloading and configuring a Java Web filter for the Apache Tomcat installation.
- Stop the Apache Tomcat service.
- Go to the UrlRewriteFilter web site.
- Click the
urlrewritefilter-4.0.3.jarlink in Step 1 of the Install process. To review the documentation for the Web Filter, click Documentation at the top of the page, then click the link to the 4.0 User Manual.
- Save the .jar file to
- Add the following to the
<filter> <filter-name>UrlRewriteFilter</filter-name> <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class> <async-supported>true</async-supported> </filter> <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>
📘 Note: The
UrlRewriteFilter must be the first filter in the
6. Create a
urlrewrite.xml file in
<Tomcat_Home>/gateway/WEB-INF/, with the following contents:
<urlrewrite> <rule> <name>redirect from root</name> <condition name="host" operator="equal">host.opentext.com</condition> <from>^/$</from> <to type="permanent-redirect" last="true">http://host.opentext.com/content/</to> </rule> </urlrewrite>
7. Start the Apache Tomcat service.
📘 Note: This configuration will redirect from
http://host.opentext.com/content, which will mask the Gateway Administration Console. To access the console, the host's IP address, or some other alias must be entered into the browser address bar.
- All Categories
- 102 Developer Announcements
- 50 Articles
- 89 General Questions
- 118 IM Services
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.8K Extended ECM
- 893 Cloud Fax and Notifications
- 75 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 90 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management