This documentation is for WSO2 Application Server version 5.0.0. View documentation for the latest release.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

URL shortening is a widely-used technique, which makes long URLs significantly shorter in length but still directed to the correct address. This is achieved by an HTTP redirect on a short domain name.

When a tenant hosts a Web application to be used by external parties, it should ideally have a short URL. Shorter URLs are easier to be memorized and typed, which eliminates the need to log-in to access the application. Also, tenant information and other descriptive attributes are hidden in shorter URLs and they are more convenient in hard-copy productions and social media services.

The URL shortening functionality is provided by the following feature of the WSO2 feature repository:

Name: WSO2 Carbon - URL Mapper Feature
Identifier: org.wso2.carbon.url.mapper.feature.group

The URL mapping functionality is bundled by default in the WSO2 Application Server. If it is not included in the WSO2 product you are using, you can install it using the instructions provided in section Feature Management. Once installed, the necessary menus will appear in the product's management console.

To access a Web application hosted in the Application Server, you need to enter the URL: https://ip:port/webappname. If the Web application is deployed in a tenant, then the URL is https://ip:port/webapps/t/tenant_domain/webappname. But, with the URL Mapper feature, this URL can be shortened as follows, whether you are having a tenant or not: https://appid.wso2.com:port.

Once you create an 'appid' using the Web application's dashboard, you get a domain for your hosted Web application:
https://ip:port/webapps/t/tenant_domain/webappname => https://appid.wso2.com:port

Follow the instructions below to shorten the URL of a Web application.

 1. Log on to the product's management console and select "List" under "Web Applications."

2. The "Running Web Applications" page appears. Select an application and click on it to access its dashboard. For example,

3. If the URL mapping feature is installed in your product, the "URL Mappings" link should appear in the application's dashboard, in the "operations" panel as follows:

Click the "URL Mappings" link.

4. The "URL Mappings" window opens. Click the "Add New Mapping" link.

5. Enter a URL mapping name. For example,

6. The added URL mapping appears in the "URL Mapping" window. From there, you can edit or delete the mapping.

7. Once the URL mapping is created, your domain is "exampleapp.wso2.com". Whether you are a tenant or not, you can access this Web application by entering the URL "https://exampleapp.wso2.com:port" as shown below:

Also, to access your own domain, a cname is required. If a cname is not available at the moment, you can use /etc/hosts to put your domain entries pointing to the local ip. This is applicable only for testing purposes.

  • No labels