Anchor | ||||
---|---|---|---|---|
|
Tip |
---|
See also the |
In This Topic
Table of Contents | ||
---|---|---|
|
...
When XperienCentral's SEO component is installed, theoretically all URLs for your website are friendly. The friendly URL for pages is constructed using the page's location in the navigation tree together with the URL title, navigation title, or page title (depending on how SEO is configured). For example, if a page has the title "XperienCentral", then the URL of the page will be .../xperiencentral.htm
(or .html). With SEO disabled, the URL of a page is not created using the pagespage's friendly URL title, instead an internal ID as assigned to pages within XperienCentral is used, for example .../id=77581/langid=42
. For search engines and users, the unfriendly URL provides no useful meaning regarding the contents of the page and/or its location in the website's navigation hierarchy.
...
- The URL's extension is set to .htm. The extension is defined by the
friendly_url_extension
setting in the General tab of the Setup Tool). - The separator symbol, which is substituted for spaces that appear in titles, is a dash (-). The separator symbol is defined by the
friendly_url_separator
setting in the General tab of the XperienCentral Setup Tool. The default is a dash (-).
...
Title | Navigation Title | URL Title | Friendly URL |
---|---|---|---|
Welcome to GX | Welcome | /welcome.htm | |
News | welcome/news.htm | ||
Articles | welcome/news/articlearticles.htm | ||
News Archive | welcome/news/news-archive.htm | ||
Products overview | Products | welcome/products.htm | |
XperienCentral | welcome/products/xperiencentral.htm |
...
Content Item Title | Display on Page | Friendly URL |
---|---|---|
XperienCentral 10 | Products | welcome/products/xperiencentral-10.htm |
Engagement | Articles | welcome/news/articles/engagement.htm |
Version 10 | XperienCentral | welcome/products/xperiencentral/version-10.htm |
Google News ID for Articles
Info |
---|
The example Friendly URLs in the table above do not take into account the configuration of the |
Google News ID for Articles
If the Google News ID has been enabled in XperienCentral, the friendly URL of content items is generated in a slightly different manner. A unique ID (number) is prefixed to the part of the friendly URL just before the title of the article, for example,.../02041/GX-releases-XperienCentral-version-10,htm
. This is done in order to satisfy a requirement of the Google News article aggregation service.
...
In addition to the friendly URL, a content item can also be navigated to from a second friendly URL that omits the friendly URL separator. For example, if the friendly URL separator is a dash (-) and the friendly URL for a page is gx-products.htm
then the above page is also available at the friendly URL gxproducts.htm
...
Page Title Uniqueness
In XperienCentral it is not required that all web pages have a unique title. Because the friendly URL is determined based on the title of a page plus its location in the navigation structure, two or more pages can have the same title and not have friendly URL conflicts. For example:
...
Parent Page Title(s) | URL Title | Navigation Title | Page Title | Friendly URL |
---|---|---|---|---|
GX/Sales | Contacting | Contact | gx/sales/contacting.htm | |
GX/Sales | Contact us | Contact | gx/sales/contact-us.htm | |
GX/Sales | Contact | gx/sales/contact.htm |
Info |
---|
The example Friendly URLs in the tables above do not take into account the configuration of the |
...
Content Item Title Uniqueness
...
This is because content items can be displayed on any page and therefore XperienCentral has no way of determining at the time that a content item is created where it will be displayed and therefore what its full friendly URL will be. XperienCentral only compares the friendly URL of newly created content items to last part of all existing friendly URLs '. htm'. For For example, creating a content item that resolves to the friendly URL 'Contact.htm' would lead to a friendly URL conflict with all the pages in the following table:
...
In XperienCentral, when two pages/items attempt to resolve to the same friendly URL, the conflict is resolved automatically. The mechanism for resolving friendly URLs is fully described in How Friendly URLs are Constructed.
Info |
---|
The example Friendly URLs in the table above do not take into account the configuration of the |
...
Anchor | ||||
---|---|---|---|---|
|
...
Order Created | URL Title | Navigation Title | Page Title | Friendly URL |
---|---|---|---|---|
1 | Contact | Contact | contact.htm | |
2 | Contact | contact-1.htm | ||
3 | Contact us | Contact | contact-us.htm | |
4 | Contact | contact-2.htm | ||
5 | Contact | Contacting GX | contact-3.htm |
...
Panel | ||||
---|---|---|---|---|
| ||||
The following applies to XperienCentral versions R36 and higher. |
Friendly URL Conflict Indicator
When you create a new page or content item, XperienCentral assigns a friendly URL to it based on the rules explained in the previous sections. For each new page/ content item you create, a check is made to see whether the requested friendly URL is available. If the friendly URL that the page/ content item wants is available, it is granted. If, however, the friendly URL is already in use, a message will appear in the "Properties of all versions" section of the SEO tab in Content Item Properties indicating that the desired friendly URL is already in use and that a new friendly URL has been assigned to the current page/content item. For example, the A friendly URL title 'Contact' is already claimed can already be used by another page or content item. When the content item or it can also be a reserved context path. For example, the friendly URL "Contact" is already claimed by another content item. When the page below entitled "Contact" is created, an indicator that the friendly URL is already claimed displays above the pagein the SEO tab of the Content Item Properties panel:
In the example above, the message that displays is: "URL is set to 'Contact/contact-1.htm'. The URL Contact is already used by 'Contact.htm'" ". In this case, because the friendly URL 'Contact"contact.htm' " is already claimed, the current page content item is automatically assigned the URL 'Contact"contact-1' ,htm" to ensure that all friendly URLs remain unique. The above action is performed on all XperienCentral pages and content items that attempt to use a friendly URL that is already claimed. To link to the page/ content item that is claiming the friendly URL that the current page/ content item wants, click the name of the item that is claiming the friendly URL that you want to use in the indicator ('"Contact' " in the example above).
When the friendly URL you want to use for an item is already claimed, you have the following options:
...
Likewise, when a content item attempts to claim a friendly URL that is a reserved context path, that is indicated. For example:
In the example above, "salesforce" is a reserved context path. If you create a content item with the same name, you will see a message similar to that shown above.
When the friendly URL you want to use for an item is already claimed, you have the following options:
- Accept the friendly URL as assigned by XperienCentral.
- Rename the title (URL, navigation, page) of the current page/ content item that is attempting to use the claimed friendly URL to a desired, unclaimed friendly URL.
- If the title of the page or content item itself conflicts with a claimed friendly URL but you nevertheless want to continue using it, add an unused navigation or URL title that does not produce a friendly URL conflict. For page title conflicts, you can also make use of an alternate URL path to avoid the conflict. Alternate URL paths are described in detail in Using Alternate URL Paths.
- Release the URL from the page/ content item that is claiming it so that it can be used by the current page/ content item. See Releasing Claimed Friendly URLs for complete information.
- If the conflict is caused by a reserved context path, you must either select a different URL or modify the reserved context path in the
application_settings
section of the General tab in the Setup Tool.
...
Maintaining Friendly URLs
...
Heading | Description |
---|---|
id | An internal identifier for the friendly URL within XperienCentral. IDs are assigned in the order that friendly URLs are created, beginning with 1 and incrementing by 1 for each new friendly URL. |
URL title | The title of the friendly URL as derived from the URL title, navigation title, or page/content item title. |
Normalized URL title | The friendly URL title after it has been normalized. Normalizing URL titles is necessary in order to ensure that they are valid for browsers. The normalizing of friendly URL titles is described in detail in the section URL Title Standardization. Note: The normalized URL title as it appears in the exported list does not preserve case usage and does not contain the separator symbol that is substituted for spaces in the friendly URL |
Querystring | An internal string that XperienCentral uses to retrieve pages, content items, and external database objects. The query string syntax for each item type within XperienCentral has a unique form, for example:
|
Current URL Title | Specifies the identifier (from column 1) that is the current friendly URL for this item. If an item contains an entry in this column, it means that it is no longer an active URL: When this friendly URL is navigated to, the visitor will be redirected to the friendly URL referenced by the id in 'Current URL title' instead.See Maintaining Items with More Than One Friendly URL for more information. |
WebsiteID | An internal identifier that refers to the channel that the page belongs to. Content Repository items are assigned the value "-1" because they can appear in any channel in the configuration and therefore do not belong to a specific one. |
...
When a content item or page is created that attempts to use a claimed friendly URL, it is assigned a unique URL based on the title of the URL it wants as described in Friendly URL Claiming. To see the items on your website attempting to claim a friendly URL that is already in use, follow these steps:
...
- Navigate to Configuration > SEO.
- On the [Overview] tab, select "All pages without friendly URLs". The items without a friendly URL are listed. If any items appear in the list, you can manually recalculate the friendly URL for some or all items on your website.
- Click the [Friendly URLs] tab.
- Select the type of recalculation to be performed:
- Calculate the friendly URL for all items which have no friendly URL yet. A friendly URL will be assigned only to the selected items currently lacking a friendly URL.
- Recalculate the friendly URL for all items. A friendly URL will be calculated for all the selected items belonging to the current channel. The URL history for pages and content items will be preserved.
- Select the items for which the friendly URL calculation will be performed: "Pages" or "Content Repository items".
- Click
[Calculate]
. Items with no friendly URL will be assigned one.
...
Panel | ||||
---|---|---|---|---|
| ||||
The following applies to XperienCentral versions R36 and higher. This documentation is meant for developers and application managers. |
Running XperienCentral without a Friendly URL Extension
It is possible to run XperienCentral without using a friendly URL extension. This means that URLs like /contact
are possible. In order to activate this feature, a few changes need to be made to both the configuration of Apache and XperienCentral.
Updating the Apache Configuration
In an existing Apache environment, the following configuration is usually used to route traffic from Apache to XperienCentral:
R35 and earlier
Code Block | ||
---|---|---|
| ||
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_URI} !^/admin/
RewriteRule ^/(.*)\.htm$ /web/$1.htm [PT,L] |
R36 and later
Code Block | ||
---|---|---|
| ||
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_URI} !^/admin/
RewriteRule ^/(.*)\.htm$ /web/seo/$1.htm [PT,L] |
When the friendly URL is blank (extensionless), it can no longer be redirected. Use the following code to run XperienCentral without a friendly URL extension.
Code Block | ||
---|---|---|
| ||
DirectoryIndex index.html
<IfModule mod_rewrite.c>
RewriteEngine On
#Optional to make sure that old urls are redirected to XC properly
RewriteRule ^(.*).htm$ $1 [R=301,L]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/web/
RewriteCond %{REQUEST_URI} !^/systemlogs
RewriteCond %{REQUEST_URI} !^/static
RewriteCond %{REQUEST_URI} !^/upload
RewriteCond %{REQUEST_URI} !^/upload_mm
RewriteRule ^(.*)$ /web/seo$1 [PT,L]
</IfModule> |
In order to active extensionless friendly URL's in XperienCentral, the following steps should be executed:
Update the Friendly URL Setting application_settings.friendly_url_extension
In the General tab of the Setup Tool, clear the above field.
Clearing the cache
Since the cached files in XperienCentral contain links with the extension still included, the cache should be cleared entirely (see Server Configuration). There are two ways to do this. You can either use "Initialize caching" or set all the other timestamps. Initialize caching should only be used on an environment which is not currently in production. When the server is not running in production you can use the Initialize caching option and then reindex the frontend search index to preload the cache before going live again.
The other option is to click "Update timestamps" for all options except for "Initialize caching". This means that a page is refreshed in the background after it's been served from the cache the first time it was requested after the timestamps have been updated. This does mean that the user that requests the page for the first time after the timestamps have been set will be served a cached version with links that won't work. In order to prevent the user from getting 404 errors, you can configure Apache to rewrite any URLs containing the old extension to the version without the extension. See "Updating the Apache Configuration" above for an example.
Reindex the Frontend Index
The frontend index contains links with the old friendly URL extension, so in order to fix that the frontend search index should be rebuilt. If the Apache RewriteRule
to strip the extension from any incoming URLs is used, this may be done in production because the old URLs will be rewritten by Apache to the new format.
Configure Reserved Context Paths
When running XperienCentral without an extension, a few paths should be added to the application_settings.reserved_context_paths
(see reserved_context_path
) in the General tab of the Setup Tool. The following values should be added:
- web
- static
- upload
- upload_mm
- cfg
- info
- wm