TKSL urls. /code/some-weird-name.html
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Code=$1 [L,NC,QSA]
RewriteCond %{REQUEST_URI} !^/help/(.*).html$ [NC]
RewriteRule ^(.*)/([^/.]+).html$ /mm5/merchant.mvc?Screen=TKSL&Code=$1 [L,NC,QSA]
ErrorDocument 404 /NTFD.html
<mvt:item name="toolkit" param="tksl" />
<mvt:comment>beginning of page not found handler - used in conjunction with the tksl function</mvt:comment>
<mvt:if expr="g.Screen EQ 'NTFD'">
<mvt:item name="toolkit" param="gettoken|g.error_messages[1],',2|oldcode" />
<mvt:item name="toolkit" param="render|ARCHIVE|archive_list" />
<mvt:if expr="('*' $ g.oldcode $ '^') CIN g.archive_list">
<mvt:item name="toolkit" param="mvassign|sublist|substring(archive_list,(('*' $ g.oldcode $ '^') CIN g.archive_list),150)" />
<mvt:item name="toolkit" param="gettoken|g.sublist,#,1|alternate" />
<mvt:item name="toolkit" param="sglosub|g.alternate,*," />
<mvt:item name="toolkit" param="gettoken|g.alternate,^,1|old" />
<mvt:item name="toolkit" param="gettoken|g.alternate,^,2|screen" />
<mvt:item name="toolkit" param="gettoken|g.alternate,^,3|new" />
<mvt:item name="toolkit" param="gettoken|g.alternate,^,4|message" />
<mvt:item name="toolkit" param="vassign|replace|g.Screen" />
<mvt:if expr="g.Screen EQ 'PROD'">
<mvt:item name="toolkit" param="vassign|Product_Code|g.new" />
<mvt:item name="toolkit" param="vassign|replace|g.new" />
</mvt:if>
<mvt:if expr="g.Screen EQ 'CTGY'">
<mvt:item name="toolkit" param="vassign|Category_Code|g.new" />
<mvt:item name="toolkit" param="vassign|replace|g.new" />
</mvt:if>
<mvt:if expr="g.Screen EQ 'SRCH'">
<mvt:item name="toolkit" param="vassign|Search|g.message" />
</mvt:if>
</mvt:if>
<mvt:if expr="g.Screen EQ 'NTFD'">
<mvt:item name="toolkit" param="headeroutput|Status|404 Not Found" />
<mvt:else>
<mvt:if expr="g.Screen EQ 'SRCH'">
<mvt:item name="toolkit" param="mvassign|querystring|asciichar(38)$'customfield1=condition'$asciichar(38)$'customfield2=genre'$asciichar(38)$'customfield3=circa'" />
<mvt:item name="toolkit" param="sassign|newurl|http://mm55.emporiumplus.com/%replace%.html?Search=%search%%querystring%" />
<mvt:item name="toolkit" param="vglosub|newurl,%replace%,g.replace" />
<mvt:item name="toolkit" param="vglosub|newurl,%search%,g.search" />
<mvt:item name="toolkit" param="vglosub|newurl,%querystring%,g.querystring" />
<mvt:item name="toolkit" param="headeroutput|Status|301 Moved Permanently" />
<mvt:item name="toolkit" param="vheaderoutput|Location|g.newurl" />
<mvt:else>
<mvt:item name="toolkit" param="sassign|newurl|http://mm55.emporiumplus.com/%replace%.html" />
<mvt:item name="toolkit" param="vglosub|newurl,%replace%,g.replace" />
<mvt:item name="toolkit" param="headeroutput|Status|301 Moved Permanently" />
<mvt:item name="toolkit" param="vheaderoutput|Location|g.newurl" />
</mvt:if>
</mvt:if>
</mvt:if>
<mvt:comment>end of page not found handler</mvt:comment>
<mvt:comment>beginning of alternate page assignment</mvt:comment>
<mvt:if expr="g.Screen EQ 'PROD'">
<mvt:if expr="g.altpageid GT 0">
<mvt:item name="toolkit" param="altpagecode|newscreen|g.altpageid" />
<mvt:else>
<mvt:item name="toolkit" param="customc|newscreen|g.Product_Code|screencode" />
</mvt:if>
<mvt:if expr="g.newscreen">
<mvt:item name="toolkit" param="vassign|Screen|g.newscreen" />
</mvt:if>
<mvt:else>
<mvt:if expr="g.Screen EQ 'CTGY'">
<mvt:if expr="g.altpageid GT 0">
<mvt:item name="toolkit" param="altpagecode|newscreen|g.altpageid" />
<mvt:else>
<mvt:item name="toolkit" param="customcategoryc|newscreen|g.Category_Code|screencode" />
</mvt:if>
<mvt:if expr="g.newscreen">
<mvt:item name="toolkit" param="vassign|Screen|g.newscreen" />
</mvt:if>
</mvt:if>
</mvt:if>
<mvt:comment>end of alternate page assignment</mvt:comment>
<mvt:comment>redirect to the correct screen</mvt:comment>
<mvt:item name="toolkit" param="vrender|g.Screen" />
<mvt:exit>
<mvt:assign name="prodURL" value="tolower(l.settings:product:name)" />
<mvt:assign name="prodCode" value="l.settings:product:code" />
<mvt:item name="toolkit" param="sglosub|g.prodURL,-," />
<mvt:item name="toolkit" param="sglosub|g.prodURL, ,-" />
<mvt:item name="toolkit" param="sglosub|g.prodURL,&,and" />
<mvt:item name="toolkit" param="sglosub|g.prodURL,--,-" />
<mvt:item name="toolkit" param="sglosub|g.prodURL,!," />
<mvt:item name="toolkit" param="sglosub|g.prodURL,'," />
<mvt:item name="toolkit" param="sglosub|g.prodURL,.,-" />
<mvt:item name="toolkit" param="sglosub|g.prodURL,/," />
<mvt:item name='toolkit' param='sglosub|g.prodURL,",' />
<mvt:assign name="prodURL" value="'/' $ g.prodCode $ '/' $ g.prodURL $ '.html'" />
/&mvt:sub_category:code;.html
or same as product but do it with the category name -- up to client.