Short URLs in ePages6 | → 6.12.2 | Created: 6.0.7; Updated: 6.0.7 |
Table of Contents |
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:
It is not possible to use Short URLs for:
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
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.
ShortUrlIds may not be longer than 255 characters.
If Short URLs cannot be activated or generated, check the following settings:
Defining rules for exceptions to not generate ShortURLs:
... [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).
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} ...
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
EPAGES_REWRITE_CONF=$HTTPD_ROOT/conf/extra/zzz-epages-rewrite.conf
[ -x "$EPAGES"/bin/update-rewrite-conf.sh ] && "$EPAGES"/bin/update-rewrite-conf.sh
This line must exist BEFORE starting the webserver.
<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