
Shortening the context root of a store URL
Shortening the context root of a store's URL makes it easier for shoppers to remember a link and also improves visibility in search engine results.
About this task
http://hostname/webapp/wcs/stores/servlet/StoreName/index.jsp
to something shorter, such as:
http://hostname/shop/StoreName/index.jsp
. In this
example, shop
is used to replace the context root, but any name can be used in its
place.The context root is not available to be shortened for the store preview.
You no longer need to install this interim fix before you can
specify a blank context root value.
To shorten the context root of
a store URL within your development environment, ensure that you have a web server that is
configured to work with your environment. You must configure the web server to work with your
environment before you begin. You can install and configure the IBM HTTP Server to work with
WebSphere Commerce development environment. For more information, see Configuring the IBM HTTP Server to work with WebSphere Commerce Developer

Procedure
- If you are running an IIS web server:
- If you are running an IBM HTTP Server:
- If you are running a Sun web server:
What to do next
- Open the WebSphere Commerce configuration file.
- Search for the
SEOConfiguration
section. - Within the
SEOConfiguration
section, enter the code:
For example:<context-root-rewrite value="/shop" />
<SEOConfiguration defaultUrl="" dynamicUrl="true" enable="true"> <context-root-rewrite value="/shop" /> </SEOConfiguration>
- Save the file.
- Propagate the changes to the WebSphere Commerce configuration file.