Swap Link
Copyright © 2002, William Weiland
Overview
Converts your category and product links to URLs so that search engines will index your Merchant pages. Some search engines will not index URLs which have Store_Code in the URL. The Swap Link module can further enhance your chances of search engine ranking by producing static sitelink*.htm files which list all of your categories and products with the shorter parameter link. This feature is configurable to allow you to optimize the sitelink pages with meta tags, keyword rich text, etc.
Initial Setup
Use the Merchant admin upload feature to upload the module. Once uploaded, click the Add button to add it to the mall/domain.

In admin, under your store, click on the link for Utilities Configuration Screen. Assign the module and Update it to install it in your store.

Click the link for Swap Link to enter the configuration settings from the Utilities Configuration screen.


Configuration Settings
In admin, under the store, select the Utilities link. Then select the link for Swap Link so that you can configure the module. The entries are self explanatory.




Directory Style Links in merchant.mvc
Leave blank if you do not have .htaccess re-write capability
Enter link root, e.g. http://www.yourdomain.com/go/
This link takes no additional parameters and replaces the links in the category tree, product list, and search screens with directory style links (DSL)

Replace standard links with directory style links (DSL) in sitelink files
Leave blank if you do not have .htaccess re-write capability

Generic re-write:
Enter link root, e.g. http://www.yourdomain.com/go/
Affiliate code can be included in DSL by ending the link root with a # and then entering the affiliate info,
e.g. http://www.yourdomain.com/go-a/#/Affiliate/affiliate code
Note the minor difference in the go vs go-a so that you can have both types in the same .htaccess file
Example .htaccess file to be placed in your domain root directory if you don't already have one

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/go/(.*)/SFNT [NC]
RewriteRule (.*) /Merchant2/merchant.mvc?Screen=SFNT&Store_Code=%1 [R,L]
RewriteCond %{REQUEST_URI} ^/go/(.*)/CTGY/(.*) [NC]
RewriteRule (.*) /Merchant2/merchant.mvc?Screen=CTGY&Store_Code=%1&Category_Code=%2 [R,L]
RewriteCond %{REQUEST_URI} ^/go/(.*)/PROD/(.*)/(.*) [NC]
RewriteRule (.*) /Merchant2/merchant.mvc?Screen=PROD&Store_Code=%1&Product_Code=%3&Category_Code=%2 [R,L]
RewriteCond %{REQUEST_URI} ^/go-a/(.*)/SFNT/Affiliate/(.*) [NC]
RewriteRule (.*) /Merchant2/merchant.mvc?Screen=SFNT&Store_Code=%1&Affiliate=%2 [R,L]
RewriteCond %{REQUEST_URI} ^/go-a/(.*)/CTGY/(.*)/Affiliate/(.*) [NC]
RewriteRule (.*) /Merchant2/merchant.mvc?Screen=CTGY&Store_Code=%1&Category_Code=%2&Affiliate=%3 [R,L]
RewriteCond %{REQUEST_URI} ^/go-a/(.*)/PROD/(.*)/(.*)/Affiliate/(.*) [NC]
RewriteRule (.*) /Merchant2/merchant.mvc?Screen=PROD&Store_Code=%1&Product_Code=%3&Category_Code=%2&Affiliate=%4 [R,L]


Search Friendly Link (SFL) re-write:
Enter link root, e.g. http://www.yourdomain.com/page/
Affiliate code can be included in SFL style links by ending the link root with a # and then entering the affiliate info,
e.g. http://www.yourdomain.com/page/#/Affiliate/affiliate code

Site Link Page Generator
Note: OpenUI is not required for this feature in the module. In admin, under the store, select the image to the left of the Utilities link (see screen shot above). The list of Utility modules will appear below the word "Utilities". Then select the link for Swap Link. Click the Export Link File button. Within seconds the site link pages will be generated. They are named sitelink + store ID number + the page number, e.g. sitelink1-1.htm, sitelink1-2.htm. The pages are broken up if their size is going to be over 100K, which seems to be a critical limiting length for search engine optimization. Then you will need to create a link on your store's index.htm or sitemap.htm page to the first site link page (sitelink1-1.htm). If your store ID is other than 1, then substitute the number in the link, e.g. store #6 would be sitelink6-1.htm for its first site link page.
Swap Link product page