This page is for use with Tool Kit version 5.163 (5.222 if you are using alternate page codes) or newer. If your
version is older, please update it first.
1. Example .htaccess file contents
RewriteEngine On
DirectoryIndex /mm5/merchant.mvc?Screen=SFNT
RewriteRule ^mm5/admin.mvc? - [L]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([^/]+)-p-([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Product_Code=$1&Category_Code=$2&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Code=$1&%{QUERY_STRING} [L]
2. The TKSL page is used with the "tksl" function. If your .htaccess is different because you use a different link
style you could still use this handler screen. As example, here is the old and new version of the Miva Merchant
generated .htaccess file http://www.emporiumplus.com/v5/tk_oldhtaccess.txt The key is that you have to change the
Screen to TKSL. Then if your .htaccess knows it is a product, you could supply the product_code and category_code
(if known) to the TKSL screen. Likewise, if your .htaccess knows it is a category, you could supply the category_code
to the TKSL screen for a fast redirect. It will handle the input and get the customer to the correct screen. If it
is not a product or category, then you supply the screen value as the "Code" sent to TKSL. The tksl function will
determine if it is a product, category or screen and rename the screen to PROD with Product_Code, CTGY with
Category_Code or Screen as applicable.
Example code on the TKSL page template. While you could go with the simple three line code described in the
module's product page, this code below does two other optional functions.
a. On rare occasions a customer may enter a code for a page that is now obsolete and has been deleted.
You can have a page not found handler which will send them to an existing, replacement or similar page. You can
even send them to the search page with keywords which will display similar products. If you have not deleted
pages, then you can remove this section of the TKSL page template and do not need to make an ARCHIVE page
template as described in number 3 in this text file. In the example below, be sure to change the mm55.emporiumplus.com
to your actual domain in a couple of places.
b. The other feature is the ability to use multiple category and product page templates so that various
groups of categories or products can have different look and feel of their pages. Create a custom category and
custom product field called "screencode". In that field you will enter the alternate page template the
customer will be sent to. If left blank, it will go to the default. So as example, let's say you have the
standard CTGY page template for most of your categories. Let's say you have a few categories that need to have a
slightly different layout. You would create a new CTGY template (see the ctgyproduct_list function in the
tool kit for a brief discussion about creating duplicate pages) with a new screen code, e.g. CTGYLINE. Important
tip: If you want to use our continue shopping (lasturl) feature, make sure you begin the name of the new screen
code with CTGY for categories and PROD for products. The continue shopping knows to treat the url as a category if
it sees CTGY at the beginning of the code. Then in the custom category field of the applicable categories you
would enter the word CTGYLINE. The alternate page assignment code below would then reassign the new screen
(page template) to be used for those categories. No need to buy additional, expensive modules to do the page
reassignment to special templates. This system is as fast, if not faster, then the other methods of reassignment.
If you are not going to use this multiple category and product page template feature, you can remove those lines
of code from the TKSL example below too. Beginning with Merchant PR8 update 4, you can assign alternate page
display directly on the product edit screen without having to use the custom product or category field "screencode".
If you do this, you will need Tool Kit version 5.2220 or newer to retrieve the page code using the altpagecode function.
beginning of page not found handler - used in conjunction with the tksl function
end of page not found handler
beginning of alternate page assignment
end of alternate page assignment
redirect to the correct screen
3. Creating an ARCHIVE file is easy. Create a new page template with the code ARCHIVE. In this page you will
list the codes for categories, products, or page templates which have been deleted. You will designate a screen
to send them to and in the case of categories and products, the new destination category or product. If you don't
have a specific, new product, you can send them to the search screen and insert the applicable key words for the
search. Below is an example ARCHIVE file. The numbers at the beginning of each line are optional. There are
four parts to each line. Each line must have the * just before the obsolete code. It must also have three ^
characters and end with the # character. As stated already, the first part begins with * and the obsolete code,
followed by the first ^. Between the first and second ^ is the second part of the line. It will contain the
destination screen. That could be PROD, SRCH, CTGY or even a page template. In the example below the 3rd line
shows we have renamed our page template for the contact form from CONTACT to CONTACTUS. Line 3 will make that
reassignment. The first two parts are required for all scenarios. The 3rd part (between the 2nd and 3rd ^)
contains the new category or product code when the reassignment involves categories or products. The 4th part
(between the last ^ and the # character) is usually blank. However, in the line 4 example below, the product
code JSOF has been deleted. Instead of sending the customer to a specific product, this reassignment will send
them to the SRCH (search) page and run a search for the keyword America. As you can see from the TKSL page
code above, there will be one of two outcomes. If there was not ARCHIVE reassignment, it will go to the NTFD
page and send a 404 header back to search engines. If there was a reassignment, it will go to the destination
you have established and provide search engines with a 301 header so they will not try to search that dead
link and will go to the new page. Note, if you have updated your Merchant to the PR7 release (aka Wombat), Miva
has included the 404 error as part of the NTFD page automatically. So you need to remove the one line in the TKSL
template above as it would be redundant.
1*ZLKJS^PROD^PK_00011^#
2*DSFL^CTGY^PK_^#
3*CONTACT^CONTACTUS^^#
4*JSOF^SRCH^^America#