Short URLs in ePages6 6.15.1
Created: 6.0.7; Updated: 6.14.2

Table of Contents

1 General information / introduction

Starting with ePages 6.0.6 it is possible to configure alternate and shorter URLs calling single shop pages.

Default URL:

  http://www.myshop.de/epages/DemoShop.sf/de_DE/?ObjectPath=/Shops/DemoShop/Products/lt_0401107001

New Short URL:

  http://www.myshop.de/Leatherman-Pocket-Survival-Tool

The Short URL follows the schema [ShopDomain]/[ShortUrlId]. The merchant can generate Short URLs for all pages that are based on objects of the ContentObject class. These are:

Once configured, the Short URL is the preferred URL being communicated to the internet. Short URLs can be used without restrictions in regards to license or shop types.

It is not possible to use Short URLs for:

Note: Short URLs can only be used in shops that have their own domains!

2 Advantages

Results in search engines contain - besides page details and content - the URL of the page. Having the URL short and informative is helpful and recommended:

Short URLs are

3 How does it work?

  1. Webserver: new incoming request for http://www.myshop.de/Product1
  2. Webserver: URL rewrite to http://www.myshop.de/epages/.shorturl?URI=Product1
  3. RequestRouter: forward the request to the application server pool being defined for domain "www.myshop.de"
  4. Servlet: find StoreDB and ShopID for domain "www.myshop.de"
  5. Servlet: requesting data for parameter "Product1" from StoreDB
  6. Database: returns StoreAlias, GUID or ObjectID for valid parameters. Data are sent to the default storefront servlet and processed as usual. For invalid parameters, HTTP404 "Not found" is initiated.

3.1 Avoiding duplicate content

Duplicate content causes trouble with most search engines - there is more than one URL pointing to the same page/content. To avoid issues by having i. e.

  http://www.meinshop.de/epages/DemoShop.sf/de_DE/?ObjectPath=/Shops/DemoShop/Products/lt_0401107001
  http://www.meinshop.de/Leatherman-Pocket-Survival-Tool
  http://server/epages/DemoShop.sf/?ObjectPath=/Shops/DemoShop/Products/lt_0401107001&ViewAction=ViewProductViaPortal&Locale=de_DE&et_cid=1&et_lid=1

ePages Short URL feature comes with template changes, so called canonical links (html tag <link rel="canonical" href="..."></link>).

All pages with a defined ShortUrlId in the used language gets the canonical link added to the html head:

  <link rel="canonical" href="http://[Domain]/[ShortUrlId]" />

As a result, the search engines use and count only hits for the defined canonical URLs and show only those URLs in the search results list as a native index.

4 Changes and standard functions

BBO
The shop needs its own domain.
MBO
A message is displayed on the home-page pointing to the Short URL option once the domain is available. Next, the shop administrator can decide to have the Short URLs generated automatically or manually:
  • Automatic: Short URLs will be generated for all possible objects, see introduction above. Existing Short URLs will not be changed.
  • Manual: A detail page is displayed where object- and language-related short URL names can be defined. Overwriting an existing Short URL has to be confirmed.
  • 4.1 ShortUrlID rules

    ShortUrlIds may not be longer than 255 characters.

    5 Configure non standard installations

    If Short URLs cannot be activated or generated, check the following settings:

    5.1 WebInterface.conf

    Defining rules for exceptions to not generate ShortURLs:

    Example:

      ...
      [URLRewite]
      WebRoot=/WebRoot/
      epages=/epages/
      BaseURI=/
      ExceptionRegex=/robots.txt /favicon.ico
      ExceptionPrefix=/epages/ /WebRoot/
      ExceptionHost=shop.strato.de shop.strato.com
      ...

    With "ExceptionPrefix=/epages/ /WebRoot/" from the example above you define to have all "normal" ePages URLs are handled in the default way (-> "epages"). Furthermore the RewriteRule will not be applied to images (located in WebRoot).

    5.2 Servlet.conf

    Short URLs must be defined in their own section [ShortURL]:

      ...
      20=Diagnostics
      25=ShortURL
      29=RSS
      ...
      [ShortURL]
      expression=$hServerVariables->{SCRIPT_NAME} =~ /\.shorturl/
      package=DE_EPAGES::Content::Servlet::ShortURL
      DomainName=$hServerVariables->{HTTP_HOST}
      ...

    5.3 IIS settings on Windows OS

    Related Windows environment settings are defined in IIS.

      IIS >> Default Web site >> Properties >> ISAPI-Filter
      filter name:  ShortURL
      priority:     low
      status:       loading
      program file: D:\epages\WebAdapter\ShortUrlFilter.dll

      IIS >> Default Web site >> epages >> Properties >>
             Virtual directory >> Configuration >> Mappings
      Extension:       .shorturl
      Executable path: D:\epages\WebAdapter\ISAPIAdapter.dll
      Verbs:           all
      Edit >> "Verify that file exists" may not be enabled

      IIS >> Default Web site >> Properties >> Home directory >>
             Application security
      IIS >> Default Web site >> epages >> Properties >>
             Virtual directory >> Application security

      IIS >> Default Web site >> Properties >> Home directory >>
             Application pool
      IIS >> Default Web site >> epages >> Properties >>
             Virtual directory >> Application pool

      IIS >> Default Web site >> Manage Web Site >>
             Advanced settings >> Application pool
      IIS >> Default Web site >> epages >> Manage application >>
             Advanced settings >> Application pool

    5.4 Apache settings on Linux OS

      <IfModule rewrite_module>
        RewriteEngine on
        RewriteCond %{HTTP_HOST} !^\[2001:4bd8:2:2:213:d3ff:fe62:f1f0\]$ [NC]
        RewriteCond %{HTTP_HOST} !^x64lime$ [NC]
        RewriteCond %{HTTP_HOST} !^x64lime\.intern\.epages\.de$ [NC]
        RewriteCond %{REQUEST_URI} !^/epages/
        RewriteCond %{REQUEST_URI} !^/WebRoot/
        RewriteCond %{REQUEST_URI} !^/robots.txt
        RewriteCond %{REQUEST_URI} !^/favicon.ico
        RewriteRule ^/(.+)$ /epages/.shorturl/?URI=$1 [PT,QSA]
      </IfModule>

      LoadModule rewrite_module modules/mod_rewrite.so
      Include conf/extra/zzz-epages-rewrite.conf

      AddHandler fcgiadapter .shorturl

      RewriteEngine:  On
      RewriteOptions: Inherit

    The script "update-rewrite-conf.sh" that creates short URLs on Linux is described in http://helpcenter.epages.com/Doc/ver_6_15_1/epages/Manual/en/Shell_Scripts_for_ePages_on_Linux.html#updaterewriteconfsh update-rewrite-conf.sh.


    Copyright ePages Software GmbH 2013