Vanity URLs in WebCenter Sites 11g Release 1

image

The latest release of WebCenter Sites, 11g Release 1 (11.1.1.8.0), now includes vanity URL support. If you’ve ever used GSF’s vanity URLs, this will look very familiar to you. WebCenter Sites’s implementation, however, does contain some slight differences. More significantly, there are some nice enhancements compared to the GSF vanity URLs.

The purpose of this post isn’t to bore you with all the technical details of how the vanity URLs are setup. For all those details, check out the Oracle WebCenter Sites documentation (http://www.oracle.com/technetwork/middleware/webcenter/sites/documentati...) — in particular the Administrator, Developer, and User guides.

Here’s an overview of some of the great vanity URL features

Webroots

The Webroot asset is an important part of setting up vanity URLs. This is where you configure your root URL (similar to GSF’s master webroot) and any virtual root URLs. Unlike the GSF, WebCenter Sites lets you manage all your virtual root URLs for different environments in a single Webroot asset. In addition, you can choose to use absolute or relative vanity URLs.

Device-specific URLs and Redirects

While GSF only allowed one vanity URL per asset, WebCenter Sites allows an asset to have multiple vanity URLs. Some good reasons for allowing this are:

  • device-specific URLs: Since vanity URLs map not only to a specific asset, but also to the template that’s used to render it, having separate device-specific URLs makes it easier to manage device-specific content rendering
  • Redirects: Do you need to edit a vanity URL or redirect visitors to another page temporarily? Now you can manage 301 and 302 HTTP Status redirects from right in the Contributor interface.

Auto-Generated URLs

GSF required content contributors to manually enter vanity URLs for each asset, but WebCenter Sites can auto-generate vanity URLs for you (don't worry, you can still manually create vanity URLs). This is configured by viewing the asset type in the Admin UI and selecting “URL Pattern” from the “more…” dropdown. URL Patterns are created for each asset type (or even subtype) and can use any combination of an asset’s attributes to auto-generate a vanity URL. You can even format attribute values to be more URL-friendly by converting a value to all lowercase, convert spaces to underscores, and format dates.

Blob Vanity URLs

Need I say any more?

Vanity URL Troubleshooting

The System Tools section of the Admin UI contains a helpful tool for viewing all vanity URLs or searching for specific vanity URLs (i.e. in case you have vanity URL conflicts that need to be resolved).

Vanity URLs on a JumpStart Kit

With the GSF, using vanity URLs on a JSK required you to either connect the JSK to a webserver where you could use mod_rewrite or you had to figure out how to use Tuckey (http://tuckey.org/urlrewrite/). Now it’s much easier to use vanity URLs on a JSK. For more info, check out the Administrator’s Guide, section 24.4 Resolving Vanity URLs Using a Rewriter Filter.

 

Subscribe to Our Newsletter

Stay In Touch